org.xith3d.scenegraph
Class DummyGroupNode

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

public class DummyGroupNode
extends GroupNode

The DummyGroupNode is meant to be used, if Nodes must be grouped even if they are already in other Groups. PickingLibrary accepts instances of DummyGroupNode.


Field Summary
 
Fields inherited from class org.xith3d.scenegraph.GroupNode
children, hostGroup, numChildren, totalNumChildren, totalNumShapes
 
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
DummyGroupNode()
           
 
Method Summary
 void addChild(Node child, int index)
          Insert a child at the specified index.
protected  boolean ensureCapacity(int minCapacity)
           
protected  DummyGroupNode newInstance()
           
 Node removeChild(int index)
          Remove the child at the specified index.
 Node setChild(Node child, int index)
          Set the child at the specified index.
 void setParent(GroupNode parent)
          Sets the parent for this Node object.
 boolean traverse(DetailedTraversalCallback callback)
          Traverses the scenegraph from this node on.
 void updateBounds(boolean onlyDirty)
          Update bounds sets the bounds and virutal world bounds of all nodes recursively.
 
Methods inherited from class org.xith3d.scenegraph.GroupNode
absorbDetails, addChild, checkChild, dump, dump, expandBounds, findAll, findAll, findFirst, findFirst, freeOpenGLResources, getChild, getChildren, getChildren, getClipper, getPickHost, getScissorRect, getTotalNumChildren, getTotalNumShapes, indexOf, isPickHost, mergeInheritedClipper, mergeInheritedNodes, mergeInheritedScissorRect, numChildren, removeAllChildren, removeChild, setBoundsDirty, setBoundsDirtyUpward, setClipper, setLive, setPickHost, setPickHost, setScissorRect, setShowBounds, sharedCopy, sharedCopy, traverse, unmergeInheritedFog, unmergeInheritedLight, unmergeInheritedNodes, updateBoundsCheap
 
Methods inherited from class org.xith3d.scenegraph.Node
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, popGlobalIgnoreBounds, printBounds, pushGlobalIgnoreBounds, setBounds, setBoundsAutoCompute, setBoundsTypeHint, setDefaultPickable, setGlobalIgnoreBounds, setIgnoreBounds, setIsOccluder, setModListener, setOrderedChild, setPickable, setPickableRecursive, setPickableRecursive, setRenderable, setShadowAttachment, setShowBounds, setTransformGroup, setTreeCell, updateOrderedChild, updateTransformGroup, updateWorldTransform
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, 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

DummyGroupNode

public DummyGroupNode()
Method Detail

setParent

public void setParent(GroupNode parent)
Description copied from class: Node
Sets the parent for this Node object. If the parent is live then this node and any children it has are made live. If the parent is null then this node and any children it has are made not live.

Overrides:
setParent in class Node

ensureCapacity

protected boolean ensureCapacity(int minCapacity)
Overrides:
ensureCapacity in class GroupNode

addChild

public void addChild(Node child,
                     int index)
Insert a child at the specified index. The parent of the child is set to this object. If this object is live then the child is set live.

Overrides:
addChild in class GroupNode

setChild

public Node setChild(Node child,
                     int index)
Set the child at the specified index. If an existing child is at that location then it is removed, its parent is set to null and it is set not live. If this object is live then the child is set live.

Overrides:
setChild in class GroupNode
Returns:
the Node, that previously lived at the given position

removeChild

public Node removeChild(int index)
Remove the child at the specified index. The parent of the child is set to null. The child is made not live.

Overrides:
removeChild in class GroupNode

updateBounds

public void updateBounds(boolean onlyDirty)
Update bounds sets the bounds and virutal world bounds of all nodes recursively.

Overrides:
updateBounds in class GroupNode
Parameters:
onlyDirty - Only update those nodes which have been marked as dirty.

newInstance

protected DummyGroupNode newInstance()
Specified by:
newInstance in class GroupNode
Returns:
a new instance of this class. This is invoked by the sharedCopy() method.
See Also:
GroupNode.sharedCopy(CopyListener)

traverse

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

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