j3d.org Aviatrix3D

org.j3d.aviatrix3d
Class Scene

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

public class Scene
extends java.lang.Object

A marker interface that represents a class capable of managing the complete rendering pipeline.

A manager is used to handle a system-specific rendering technique. The goal is to manage the contained pipeline(s) in a way that is most efficient to the hardware provided. Thus, it is expected there will be many different types of managers to suit the many hardware configurations available.

Example implementations of the pipeline manager would be one that handles all the pipelines with simultaneous threads, each pinned to a particular CPU/Graphics pipe that the machine has. Another implementation may hold all the pipelines for sequential evaluation piping the output from one into the input for another (eg for handling dynamic cubic environment maps).

Basic common methods are provided for all implementations to use. It is expected that implementations will add additional technique-specific extension methods to the basic features.

Version:
$Revision: 1.2 $
Author:
Justin Couch

Constructor Summary
Scene()
          Create a default instance of this scene with no content provided.
 
Method Summary
 Fog getActiveFog()
          Get the currently set active view.
 Viewpoint getActiveView()
          Get the currently set active view.
 Group getRenderedGeometry()
          Get the root of the currently rendered scene.
 RenderEffectsProcessor getRenderEffectsProcessor()
          Get the currently set scene processor instance.
 java.lang.Object getUserData()
          Get the currently set instance of user data.
 ViewEnvironment getViewEnvironment()
          Get the currently set active view.
 Background setActiveBackground()
          Get the currently set active view.
 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.
 void setRenderEffectsProcessor(RenderEffectsProcessor prc)
          Register the scene processor to be used for this scene for pre and post rendering effects.
 void setUserData(java.lang.Object data)
          Assign some arbitrary piece of user data to this scene.
 void setViewEnvironment(ViewEnvironment env)
          Set the view environment that is used to render this surface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scene

public Scene()
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.

Parameters:
state - true if this should be marked as live now

setRenderEffectsProcessor

public void setRenderEffectsProcessor(RenderEffectsProcessor prc)
Register the scene processor to be used for this scene for pre and post rendering effects. Setting a null value will clear the current instance.

Parameters:
prc - The instance to use or null

getRenderEffectsProcessor

public RenderEffectsProcessor getRenderEffectsProcessor()
Get the currently set scene processor instance. If none is set, returns null.

Returns:
The current processor or null

setUserData

public void setUserData(java.lang.Object data)
Assign some arbitrary piece of user data to this scene. This data is also sent back to the user through scene processor callbacks when they are made. Setting a null value will clear the current instance.

Parameters:
data - some arbitrary data the user wants to provide

getUserData

public java.lang.Object getUserData()
Get the currently set instance of user data. If none provided, return null.

Returns:
Some arbitrary piece of data or null

setRenderedGeometry

public void setRenderedGeometry(Group geom)
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

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

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

getActiveFog

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

Returns:
The current view instance or null

setActiveBackground

public void setActiveBackground(Background bg)
                         throws 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

setActiveBackground

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

Returns:
The current view instance or null

setViewEnvironment

public void setViewEnvironment(ViewEnvironment env)
Set the view environment that is used to render this surface.

Parameters:
env - The environment instance to use for the render setup

getViewEnvironment

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

Returns:
The current view instance or null

j3d.org Aviatrix3D

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