Aviatrix3D
2.0 Dev

org.j3d.aviatrix3d
Class SimpleScene

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

public class SimpleScene
extends Scene

Representation of the top level structure of a piece of scene graph that can form a coherent rendering.

A scene encapsulates a viewpoint that is used to view the scene from, the geometry structure to render, data defining the view environment (eg projection type) and global data, such as the background, global fog etc.

A scene may also provide an instance RenderEffectsProcessor that allows the user to provide pre or post processing effects on a per-scene basis. Note that if you are running layers, this will be pre and post processing per layer, not per final rendering. The processor allows a limited form of immediate-mode rendering.

Version:
$Revision: 2.1 $
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
SimpleScene()
          Create a default instance of this scene with no content provided.
 
Method Summary
 Background getActiveBackground()
          Get the currently set active background.
 Fog getActiveFog()
          Get the currently set active fog.
 Viewpoint getActiveView()
          Get the currently set active view.
 Group getRenderedGeometry()
          Get the root of the currently rendered scene.
 void setActiveBackground(Background bg)
          Set the background path that should be applied to the current surface.
 void setActiveFog(Fog fog)
          Set the fog that should be applied to the current surface.
 void setActiveView(Viewpoint vp)
          Set the viewpoint path that should be applied to the current surface.
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.
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

SimpleScene

public SimpleScene()
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

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

setActiveFog

public void setActiveFog(Fog fog)
                  throws InvalidWriteTimingException,
                         java.lang.IllegalArgumentException
Set the fog 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:
fog - The instance of the active fog node
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

getActiveFog

public Fog getActiveFog()
Get the currently set active fog. If none is set, return null.

Returns:
The current view instance or null

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 background. 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