Aviatrix3D
2.0 Dev

org.j3d.aviatrix3d
Class RenderPass

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.RenderPass

public class RenderPass
extends SceneGraphObject

Representation of a single pass in a multipass rendering layer setup.

A render pass encapsulates a viewpoint that is used to view the scene from, the geometry structure to render, global fog, the geometry of the scene and a collection of buffer states.

Each pass has its own view environment that works in addition to the global environment from the parent scene. Some aspects of this environment are ignored for multipass rendering, such as the stereo flags.

Version:
$Revision: 2.2 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG
 
Constructor Summary
RenderPass()
          Create a default instance of this scene with no content provided.
 
Method Summary
 AccumulationBufferState getAccumulationBufferState()
          Get the currently set accumulation buffer state.
 Viewpoint getActiveView()
          Get the currently set active view.
 ColorBufferState getColorBufferState()
          Get the currently set color buffer state.
 DepthBufferState getDepthBufferState()
          Get the currently set depth buffer state.
 Group getRenderedGeometry()
          Get the root of the currently rendered scene.
 StencilBufferState getStencilBufferState()
          Get the currently set stencil buffer state.
 ViewEnvironment getViewEnvironment()
          Get the currently set active view.
 void setAccumulationBufferState(AccumulationBufferState state)
          Set the accumulation buffer state that should be applied to the during this pass.
 void setActiveView(Viewpoint vp)
          Set the viewpoint path that should be applied to the current surface.
 void setColorBufferState(ColorBufferState state)
          Set the color buffer state that should be applied to the during this pass.
 void setDepthBufferState(DepthBufferState state)
          Set the depth buffer state that should be applied to the during this pass.
protected  void setLive(boolean state)
          Notification that this object is live now.
 void setRenderedGeometry(Group geom)
          Set the collection of geometry that should be rendered to this texture.
 void setStencilBufferState(StencilBufferState state)
          Set the stencil buffer state that should be applied to the during this pass.
protected  void setUpdateHandler(NodeUpdateHandler handler)
          Set the scenegraph update handler for this node.
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
checkForCyclicChild, checkForCyclicParent, dataChanged, getUserData, isLive, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderPass

public RenderPass()
Create a default instance of this scene with no content provided.

Method Detail

setLive

protected void setLive(boolean state)
Notification that this object is live now. Overridden to make sure that the live state of the nodes represents the same state as the parent scene graph.

Overrides:
setLive in class SceneGraphObject
Parameters:
state - true if this should be marked as live now

setUpdateHandler

protected void setUpdateHandler(NodeUpdateHandler handler)
Set the scenegraph update handler for this node. It will notify all its children of the value. A null value will clear the current handler.

Overrides:
setUpdateHandler in class SceneGraphObject
Parameters:
handler - The instance to use as a handler

getViewEnvironment

public ViewEnvironment getViewEnvironment()
Get the currently set active view. If none is set, return null.

Returns:
The current view instance or null

setRenderedGeometry

public void setRenderedGeometry(Group geom)
                         throws InvalidWriteTimingException
Set the collection of geometry that should be rendered to this texture. A null value will clear the current geometry and result in only rendering the background, if set. if not set, then whatever the default colour is, is used (typically black).

Parameters:
geom - The new geometry to use or null
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the ApplicationUpdateObserver callback method

getRenderedGeometry

public Group getRenderedGeometry()
Get the root of the currently rendered scene. If none is set, this will return null.

Returns:
The current scene root or null.

setActiveView

public void setActiveView(Viewpoint vp)
                   throws InvalidWriteTimingException,
                          java.lang.IllegalArgumentException
Set the viewpoint path that should be applied to the current surface. The output drawn will be a combination of this information and that of the view environment.

Parameters:
vp - The instance of the active viewpoint to use
Throws:
java.lang.IllegalArgumentException - The path contains a SharedGroup or the node is not live
InvalidWriteTimingException - An attempt was made to write outside of the ApplicationUpdateObserver callback method

getActiveView

public Viewpoint getActiveView()
Get the currently set active view. If none is set, return null.

Returns:
The current view instance or null

setStencilBufferState

public void setStencilBufferState(StencilBufferState state)
                           throws InvalidWriteTimingException
Set the stencil buffer state that should be applied to the during this pass. A null value will clear the state.

Parameters:
state - The instance of the state to set
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the ApplicationUpdateObserver callback method

getStencilBufferState

public StencilBufferState getStencilBufferState()
Get the currently set stencil buffer state. If none is set, return null.

Returns:
The current buffer state or null

setDepthBufferState

public void setDepthBufferState(DepthBufferState state)
                         throws InvalidWriteTimingException
Set the depth buffer state that should be applied to the during this pass. A null value will clear the state.

Parameters:
state - The instance of the state to set
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the ApplicationUpdateObserver callback method

getDepthBufferState

public DepthBufferState getDepthBufferState()
Get the currently set depth buffer state. If none is set, return null.

Returns:
The current buffer state or null

setColorBufferState

public void setColorBufferState(ColorBufferState state)
                         throws InvalidWriteTimingException
Set the color buffer state that should be applied to the during this pass. A null value will clear the state.

Parameters:
state - The instance of the state to set
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the ApplicationUpdateObserver callback method

getColorBufferState

public ColorBufferState getColorBufferState()
Get the currently set color buffer state. If none is set, return null.

Returns:
The current buffer state or null

setAccumulationBufferState

public void setAccumulationBufferState(AccumulationBufferState state)
                                throws InvalidWriteTimingException
Set the accumulation buffer state that should be applied to the during this pass. A null value will clear the state.

Parameters:
state - The instance of the state to set
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the ApplicationUpdateObserver callback method

getAccumulationBufferState

public AccumulationBufferState getAccumulationBufferState()
Get the currently set accumulation buffer state. If none is set, return null.

Returns:
The current buffer state or null

Aviatrix3D
2.0 Dev

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