org.xith3d.scenegraph
Class BoundingLeaf

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.Node
          extended by org.xith3d.scenegraph.Leaf
              extended by org.xith3d.scenegraph.BoundingLeaf
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.openmali.spatial.SpatialNode

public class BoundingLeaf
extends Leaf

BoundingLeaf defines a bounding region that can be referenced by other leaf nodes.


Field Summary
 
Fields inherited from class org.xith3d.scenegraph.Node
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, transformGroup, untransformedBounds
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
BoundingLeaf()
          Constructs a new BoundingLeaf object with a unit sphere region.
BoundingLeaf(org.openmali.spatial.bounds.Bounds bounds)
          Constructs a new BoundingLeaf object.
 
Method Summary
 void freeOpenGLResources(CanvasPeer canvasPeer)
          This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group).
 org.openmali.spatial.bounds.Bounds getRegion()
          Gets the region.
 void setRegion(org.openmali.spatial.bounds.Bounds bounds)
          Sets the region.
 boolean traverse(DetailedTraversalCallback callback)
          Traverses the scenegraph from this node on.
 
Methods inherited from class org.xith3d.scenegraph.Leaf
dump, getPickHost, setPickHost
 
Methods inherited from class org.xith3d.scenegraph.Node
absorbDetails, cloneNode, detach, duplicateNode, freeOpenGLResources, getBounds, getBoundsAutoCompute, getBoundsType, getBoundsTypeHint, getDefaultPickable, getIndentString, getInheritedNodeAttributes, getModListener, getOrderedChild, getOrderedState, getParent, getRoot, getShadowAttachment, getShowBounds, getTransformGroup, getTreeCell, getWorldBounds, getWorldTransform, getWorldTransform, isBillboard, isIgnoreBounds, isOccluder, isPickable, isRenderable, isUpdatableNode, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBounds, setBoundsAutoCompute, setBoundsDirty, setBoundsDirtyUpward, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setModListener, setOrderedChild, setParent, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, sharedCopy, sharedCopy, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateBounds, updateBoundsCheap, updateOrderedChild, updateTransformGroup, updateWorldTransform
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BoundingLeaf

public BoundingLeaf()
Constructs a new BoundingLeaf object with a unit sphere region.


BoundingLeaf

public BoundingLeaf(org.openmali.spatial.bounds.Bounds bounds)
Constructs a new BoundingLeaf object.

Method Detail

setRegion

public final void setRegion(org.openmali.spatial.bounds.Bounds bounds)
Sets the region.


getRegion

public final org.openmali.spatial.bounds.Bounds getRegion()
Gets the region.


freeOpenGLResources

public void freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group).

Specified by:
freeOpenGLResources in class Node

traverse

public boolean traverse(DetailedTraversalCallback callback)
Traverses the scenegraph from this node on. If this Node is a Group it will recusively run through each child.

Overrides:
traverse in class Leaf
Parameters:
callback - the listener is notified of any traversed Node on the way
Returns:
if false, the whole traversal will stop