Package org.sunflow.core.renderer
Class ProgressiveRenderer
- java.lang.Object
-
- org.sunflow.core.renderer.ProgressiveRenderer
-
- All Implemented Interfaces:
ImageSampler
public class ProgressiveRenderer extends java.lang.Object implements ImageSampler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classProgressiveRenderer.SmallBucketprivate classProgressiveRenderer.SmallBucketThread
-
Field Summary
Fields Modifier and Type Field Description private intcounterprivate intcounterMaxprivate Displaydisplayprivate intimageHeightprivate intimageWidthprivate Scenesceneprivate java.util.concurrent.PriorityBlockingQueue<ProgressiveRenderer.SmallBucket>smallBucketQueue
-
Constructor Summary
Constructors Constructor Description ProgressiveRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanprepare(Options options, Scene scene, int w, int h)Prepare the sampler for rendering an image of w x h pixelsprivate intprogressiveRenderNext(IntersectionState istate)voidrender(Display display)Render the image to the specified display.
-
-
-
Field Detail
-
scene
private Scene scene
-
imageWidth
private int imageWidth
-
imageHeight
private int imageHeight
-
smallBucketQueue
private java.util.concurrent.PriorityBlockingQueue<ProgressiveRenderer.SmallBucket> smallBucketQueue
-
display
private Display display
-
counter
private int counter
-
counterMax
private int counterMax
-
-
Method Detail
-
prepare
public boolean prepare(Options options, Scene scene, int w, int h)
Description copied from interface:ImageSamplerPrepare the sampler for rendering an image of w x h pixels- Specified by:
preparein interfaceImageSamplerw- width of the imageh- height of the image
-
render
public void render(Display display)
Description copied from interface:ImageSamplerRender 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:
renderin interfaceImageSampler- Parameters:
display- Display driver to send image data to
-
progressiveRenderNext
private int progressiveRenderNext(IntersectionState istate)
-
-