Aviatrix3D
2.1.0

org.j3d.aviatrix3d
Class SimpleLayer

java.lang.Object
  extended by org.j3d.aviatrix3d.SceneGraphObject
      extended by org.j3d.aviatrix3d.Layer
          extended by org.j3d.aviatrix3d.SimpleLayer
All Implemented Interfaces:
Cullable, LayerCullable

public class SimpleLayer
extends Layer

An layer definition that only allows a single viewport that covers the entire area as it's child.

Internationalisation Resource Names

Version:
$Revision: 1.5 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.Layer
COMPOSITE, COMPOSITE_2D, layerType, SIMPLE, SIMPLE_2D
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler
 
Constructor Summary
SimpleLayer()
          Construct a new layer instance
 
Method Summary
 ViewportCullable getCullableViewport(int viewportIndex)
          Get the cullable layer child that for the given layer index.
 Viewport getViewport()
          Get the currently set viewport instance.
 int numCullableChildren()
          Returns the number of valid cullable children to process.
protected  void setLive(boolean state)
          Notification that this object is live now.
protected  void setUpdateHandler(NodeUpdateHandler handler)
          Set the scenegraph update handler for this node.
 void setViewport(Viewport vp)
          Set a new viewport instance to be used by this layer.
 
Methods inherited from class org.j3d.aviatrix3d.Layer
compareTo, equals, equals, getCullable, getType
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setUserData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLayer

public SimpleLayer()
Construct a new layer instance

Method Detail

getCullableViewport

public ViewportCullable getCullableViewport(int viewportIndex)
Get the cullable layer child that for the given layer index.

Returns:
The layer cullable at the given index or null

numCullableChildren

public int numCullableChildren()
Returns the number of valid cullable children to process. If there are no valid cullable children, return 0.

Returns:
A number greater than or equal to zero

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

setViewport

public void setViewport(Viewport vp)
                 throws InvalidWriteTimingException,
                        AlreadyParentedException
Set a new viewport instance to be used by this layer.

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

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

getViewport

public Viewport getViewport()
Get the currently set viewport instance. If no viewport is set, null is returned.

Returns:
The current viewport instance or null

Aviatrix3D
2.1.0

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