Package org.sunflow.core.renderer
Class SimpleRenderer
- java.lang.Object
-
- org.sunflow.core.renderer.SimpleRenderer
-
- All Implemented Interfaces:
ImageSampler
public class SimpleRenderer extends java.lang.Object implements ImageSampler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
SimpleRenderer.BucketThread
-
Field Summary
Fields Modifier and Type Field Description private int
bucketCounter
private Display
display
private int
imageHeight
private int
imageWidth
private int
numBuckets
private int
numBucketsX
private int
numBucketsY
private Scene
scene
-
Constructor Summary
Constructors Constructor Description SimpleRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
prepare(Options options, Scene scene, int w, int h)
Prepare the sampler for rendering an image of w x h pixelsvoid
render(Display display)
Render the image to the specified display.void
renderBucket(int bx, int by, IntersectionState istate)
-
-
-
Method Detail
-
prepare
public boolean prepare(Options options, Scene scene, int w, int h)
Description copied from interface:ImageSampler
Prepare the sampler for rendering an image of w x h pixels- Specified by:
prepare
in interfaceImageSampler
w
- width of the imageh
- height of the image
-
render
public void render(Display display)
Description copied from interface:ImageSampler
Render the image to the specified display. The sampler can assume the display has been opened and that it will be closed after the method returns.- Specified by:
render
in interfaceImageSampler
- Parameters:
display
- Display driver to send image data to
-
renderBucket
public void renderBucket(int bx, int by, IntersectionState istate)
-
-