Aviatrix3D
2.0 Dev

org.j3d.aviatrix3d
Class SimpleViewportLayer

java.lang.Object
  extended byorg.j3d.aviatrix3d.SceneGraphObject
      extended byorg.j3d.aviatrix3d.ViewportLayer
          extended byorg.j3d.aviatrix3d.SimpleViewportLayer

public class SimpleViewportLayer
extends ViewportLayer

An viewport layer definition that only allows a single, simple scene to be drawn as it's contents.

As with all viewport layers, the scene will encompass the entire area of the viewport that contains it.

Version:
$Revision: 1.3 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.ViewportLayer
FLAT, layerType, MULTIPASS, SIMPLE, viewHeight, viewWidth, viewX, viewY
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, LISTENER_SET_NOT_LIVE_MESSAGE, updateHandler, WRITE_TIMING_MSG
 
Constructor Summary
SimpleViewportLayer()
          Construct a new layer instance
 
Method Summary
 SimpleScene getScene()
          Get the currently set scene instance.
protected  void setLive(boolean state)
          Notification that this object is live now.
 void setScene(SimpleScene sc)
          Set a new scene instance to be used by this layer.
protected  void setUpdateHandler(NodeUpdateHandler handler)
          Set the scenegraph update handler for this node.
 
Methods inherited from class org.j3d.aviatrix3d.ViewportLayer
getType
 
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

SimpleViewportLayer

public SimpleViewportLayer()
Construct a new layer instance

Method Detail

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

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

setScene

public void setScene(SimpleScene sc)
              throws InvalidWriteTimingException,
                     AlreadyParentedException
Set a new scene instance to be used by this layer.

Note that a scene cannot have more than one parent, so sharing it between layers will result in an error.

Parameters:
sc - The scene instance to use, or null to clear
Throws:
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener callback method
AlreadyParentedException - This scene already has a current parent preventing it from being used

getScene

public SimpleScene getScene()
Get the currently set scene instance. If no scene is set, null is returned.

Returns:
The current scene instance or null

Aviatrix3D
2.0 Dev

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