j3d.org Aviatrix3D

org.j3d.aviatrix3d
Interface RenderPipeline

All Known Implementing Classes:
DefaultRenderPipeline

public interface RenderPipeline

A marker interface that represents a single complete rendering pipeline.

A pipeline represents all of the drawing steps that may be accomplished within a rendering cycle - culling, sorting and drawing. While an end-user may wish to directly call the methods on this interface directly to control their own rendering, it is recommended that a dedicated pipeline manager be used for this task.

If the pipeline does not have a drawable surface registered, it will still complete all the steps up to that point. If no scene is registered, no functionality is performed - render() will return immediately.

Version:
$Revision: 1.8 $
Author:
Justin Couch

Method Summary
 void displayOnly()
          Cause the surface to redraw the next frame only, with no processing of the pipeline.
 DrawableSurface getDrawableSurface()
          Get the currently registered drawable surface instance.
 void render()
          Start the pipeline functioning now.
 void setDrawableSurface(DrawableSurface surface)
          Register a drawing surface that this pipeline will send its output to.
 void setEyePointOffset(float x, float y, float z)
          Set the eyepoint offset from the centre position.
 void setRenderableLayers(Layer[] layers, int numLayers)
          Set the set of layers to be used by this pipeline.
 void setRenderableScene(Scene scene)
          Set the root of the scene graph to be used by this pipeline.
 void setScreenOrientation(float x, float y, float z, float a)
          Set the orientation of this screen relative to the user's normal view direction.
 void swapBuffers()
          Instruct the drawable at the end of this pipeline to swap the buffers now.
 

Method Detail

setDrawableSurface

public void setDrawableSurface(DrawableSurface surface)
Register a drawing surface that this pipeline will send its output to. Setting a null value will remove the current drawable surface.

Parameters:
surface - The surface instance to use or replace

getDrawableSurface

public DrawableSurface getDrawableSurface()
Get the currently registered drawable surface instance. If none is set, return null.

Returns:
The currently set surface instance or null

render

public void render()
Start the pipeline functioning now. All steps will be called and this method will not return until all are completed. Only the swap function is not called in this time as we need to have this called separately if the system is running parallel pipelines.


displayOnly

public void displayOnly()
Cause the surface to redraw the next frame only, with no processing of the pipeline. This is typically an optimisation step when nothing has changed in user land, so there's no processing that needs to be done. Skip the processing and tell the drawable surface to render again what it already has set from the previous frame.


swapBuffers

public void swapBuffers()
Instruct the drawable at the end of this pipeline to swap the buffers now.


setRenderableScene

public void setRenderableScene(Scene scene)
Set the root of the scene graph to be used by this pipeline. A value of null will remove the scene from being rendered, causing the pipeline to function as a no-op when rendered.

If layers are currently set, and a non-null scene is provided, this will remove the layers and use the scene instead. The layers will be removed completely.

Parameters:
scene - The scene instance to render

setRenderableLayers

public void setRenderableLayers(Layer[] layers,
                                int numLayers)
Set the set of layers to be used by this pipeline. Providing an argument of a zero number of layers remove the layers from being rendered, causing the pipeline to function as a no-op when rendered.

If a scene is currently set, and a non-zero number of layers is provided, this will remove the scene and use the layers instead.

Parameters:
layers - The collection of layers, in order, to render
numLayers - The number of valid layers to use

setEyePointOffset

public void setEyePointOffset(float x,
                              float y,
                              float z)
Set the eyepoint offset from the centre position. This is used to model offset view frustums, such as multiple displays or a powerwall. Positive values will move the eyepoint to the right, up and back, relative to the screen's center, effectively moving the screen to the left, down and away from the user.

Parameters:
x - The x axis offset
y - The y axis offset
z - The z axis offset

setScreenOrientation

public void setScreenOrientation(float x,
                                 float y,
                                 float z,
                                 float a)
Set the orientation of this screen relative to the user's normal view direction. The normal orientation of the screen is along the negative Z axis. This method provides and axis-angle reorientation of that direction to one that is facing the screen. Typically this will just involve a rotation around the Y axis of some amount (45 and 90 deg being the most common used in walls and caves).

Parameters:
x - The x axis component
y - The y axis component
z - The z axis component
a - The angle to rotate around the axis in radians

j3d.org Aviatrix3D

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - j3d.org