de.grogra.ray2
Interface Renderer

All Known Implementing Classes:
BidirectionalRenderer, MetropolisRenderer, PixelwiseRenderer

public interface Renderer

This interface specifies the basic operations for a renderer.

Author:
Ole Kniemeyer

Method Summary
 void initialize(Options opts, ProgressMonitor progress)
          Initializes the renderer.
 void render(Scene scene, Sensor camera, Matrix4d cameraTransformation, int width, int height, java.awt.image.ImageObserver obs)
          Renders an image of a scene.
 void stop()
          This method is invoked from another thread to stop a running renderer.
 

Method Detail

initialize

void initialize(Options opts,
                ProgressMonitor progress)
Initializes the renderer. This method has to be invoked at first.

Parameters:
opts - options to use (may be null)
progress - monitor to display rendering progress (may be null)

render

void render(Scene scene,
            Sensor camera,
            Matrix4d cameraTransformation,
            int width,
            int height,
            java.awt.image.ImageObserver obs)
Renders an image of a scene.

Parameters:
scene - scene to render
camera - camera to use
cameraTransformation - transformation from camera coordinates to world coordinates
width - width of image
height - height of image
obs - the observer receives the image data

stop

void stop()
This method is invoked from another thread to stop a running renderer. The renderer should stop rendering as early as possible. However, there is no guarantee on the time span between stop and the return from the invocation of render.