Aviatrix3D
2.0 Dev

org.j3d.aviatrix3d
Class MultipassScene

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.Scene
          extended byorg.j3d.aviatrix3d.MultipassScene

public class MultipassScene
extends Scene

Representation of the top level structure of a piece of scene graph that permits multipass rendering to be performed.

A multipass scene consists of a set of consecutive rendering passes over a single set of buffers. Buffers may or may not be cleared on each pass, depending on the buffer state attributes that are set. The end result is a single image that forms the content of a layer.

A multipass scene has a single background node that is rendered at the start of the first pass and not applied to any other passes. Fog and viewpoints are applied on a per-pass basis.

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
MultipassScene()
          Create a default instance of this scene with no content provided.
 
Method Summary
 void addRenderPass(RenderPass pass)
          Add a new pass to the end of the current rendering list.
 Background getActiveBackground()
          Get the currently set active view.
 RenderPass getRenderPass(int passNumber)
          Get the render pass at the given pass number.
 void getRenderPasses(RenderPass[] passes)
          Get all the render passes currently registered.
 int numRenderPasses()
          Request the number of rendering passes currently registered with this scene.
 void removeRenderPass(int passNumber)
          Remove the render pass at the given index.
 void setActiveBackground(Background bg)
          Set the background path that should be applied to the current surface.
protected  void setLive(boolean state)
          Notification that this object is live now.
 void setRenderPass(int passNumber, RenderPass pass)
          Replace the render pass at the given index with a different pass representation.
protected  void setUpdateHandler(NodeUpdateHandler handler)
          Set the scenegraph update handler for this node.
 
Methods inherited from class org.j3d.aviatrix3d.Scene
getRenderEffectsProcessor, getViewEnvironment, setRenderEffectsProcessor
 
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

MultipassScene

public MultipassScene()
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 Scene
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 Scene
Parameters:
handler - The instance to use as a handler

addRenderPass

public void addRenderPass(RenderPass pass)
                   throws InvalidWriteTimingException,
                          java.lang.IllegalArgumentException
Add a new pass to the end of the current rendering list.

Parameters:
pass - The rendering pass description to use
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the ApplicationUpdateObserver callback method
java.lang.IllegalArgumentException - The object passed was null

setRenderPass

public void setRenderPass(int passNumber,
                          RenderPass pass)
                   throws InvalidWriteTimingException,
                          java.lang.IllegalArgumentException
Replace the render pass at the given index with a different pass representation.

Parameters:
passNumber - The index of the pass to return, zero based
pass - The rendering pass description to use
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the ApplicationUpdateObserver callback method
java.lang.IllegalArgumentException - The index is out of range or the pass object was null

removeRenderPass

public void removeRenderPass(int passNumber)
                      throws InvalidWriteTimingException,
                             java.lang.IllegalArgumentException
Remove the render pass at the given index.

Parameters:
passNumber - The index of the pass to return, zero based
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the ApplicationUpdateObserver callback method
java.lang.IllegalArgumentException - The index is out of range

getRenderPass

public RenderPass getRenderPass(int passNumber)
                         throws java.lang.IllegalArgumentException
Get the render pass at the given pass number.

Parameters:
passNumber - The index of the pass to return, zero based
Returns:
The pass container at the given index
Throws:
java.lang.IllegalArgumentException - The index is out of range

getRenderPasses

public void getRenderPasses(RenderPass[] passes)
                     throws java.lang.IllegalArgumentException
Get all the render passes currently registered.

Parameters:
passes - An array to copy everything into
Throws:
java.lang.IllegalArgumentException - The index is out of range

numRenderPasses

public int numRenderPasses()
Request the number of rendering passes currently registered with this scene.

Returns:
A non-negative value

setActiveBackground

public void setActiveBackground(Background bg)
                         throws InvalidWriteTimingException,
                                java.lang.IllegalArgumentException
Set the background 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:
bg - The instance of the active background
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

getActiveBackground

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

Returns:
The current view instance or null

Aviatrix3D
2.0 Dev

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