artofillusion
Interface Renderer


public interface Renderer

The Renderer interface defines the methods for rendering a scene. Call renderScene() to render an image, and cancelRendering() to stop a render that is in progress.

Renderers typically have configuration options that affect the rendering process. You should always configure a Renderer before calling renderScene(). This can be done in any of three different ways.

First and most simply, you can call configurePreview(). This configures the renderer in a way which is appropriate for quick previews. It will attempt to find a balance between speed and image quality, but err on the side of speed when necessary.

Second, each Renderer can create a user interface that allows the configuration to be edited interactively. Call getConfigPanel() to get a Widget for configuring the renderer. When the user is done setting options, call recordConfiguration() to record them.

Finally, you can query and set rendering options directly with getConfiguration() and setConfiguration(). Rendering options are defined as key:value pairs. Each key is always a String. The value may be a String, Integer, Float, Double, or Boolean, depending on the specific option.


Method Summary
 void cancelRendering(Scene theScene)
          Cancel a rendering which is in progress.
 void configurePreview()
          Configure the renderer in a way which is appropriate for rendering previews.
 Widget getConfigPanel()
          Get a Widget in which the user can specify options about how the scene should be rendered.
 java.util.Map<java.lang.String,java.lang.Object> getConfiguration()
          Get a Map containing all current configuration options for the renderer.
 java.lang.String getName()
          Get the name of the renderer.
 boolean recordConfiguration()
          Record the values which the user has entered into the configuration panel.
 void renderScene(Scene theScene, Camera theCamera, RenderListener listener, SceneCamera sceneCamera)
          Begin rendering a scene.
 void setConfiguration(java.lang.String property, java.lang.Object value)
          Set the value of a configuration option for the renderer.
 

Method Detail

getName

java.lang.String getName()
Get the name of the renderer.


renderScene

void renderScene(Scene theScene,
                 Camera theCamera,
                 RenderListener listener,
                 SceneCamera sceneCamera)
Begin rendering a scene. If depthOfField is set to 0, then depth of field effect will not be used. Some renderers may not support this effect, in which case depthOfField and focalDist will be ignored.


cancelRendering

void cancelRendering(Scene theScene)
Cancel a rendering which is in progress.


getConfigPanel

Widget getConfigPanel()
Get a Widget in which the user can specify options about how the scene should be rendered.


recordConfiguration

boolean recordConfiguration()
Record the values which the user has entered into the configuration panel. If all values are valid, return true. Otherwise, return false.


configurePreview

void configurePreview()
Configure the renderer in a way which is appropriate for rendering previews. This should try to find a reasonable balance between speed and image quality.


getConfiguration

java.util.Map<java.lang.String,java.lang.Object> getConfiguration()
Get a Map containing all current configuration options for the renderer.


setConfiguration

void setConfiguration(java.lang.String property,
                      java.lang.Object value)
Set the value of a configuration option for the renderer.



Copyright © 1999-2011 by Peter Eastman.