com.vwp.j3d
Class XBranchGroup

java.lang.Object
  extended by BranchGroup
      extended by com.vwp.j3d.XBranchGroup

public class XBranchGroup
extends BranchGroup

An enhanced BranchGroup


Constructor Summary
XBranchGroup()
          Default constructor which creates a simple XBranchGroup.
XBranchGroup(Node child)
          Public constructor, allowes creation of a node and adding the fist child simultaneously
 
Method Summary
 void addChild(Node child)
          Adds a child - and tries to add it also if it is live.
 Node cloneNode(boolean flag)
           
 void removeAllChildren()
          This method is available since Java 3D 1.3 in a BranchGroup too but not for preceding versions.
 void removeChild(Node child)
           
 void setMyParent(Group myParent)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XBranchGroup

public XBranchGroup(Node child)
Public constructor, allowes creation of a node and adding the fist child simultaneously

Parameters:
child - object which has to be added as child to the newly created XBranchGroup

XBranchGroup

public XBranchGroup()
Default constructor which creates a simple XBranchGroup.

Method Detail

addChild

public void addChild(Node child)
Adds a child - and tries to add it also if it is live. Different to standard BranchGroups this method tries to do that also if the XBranchGroup is live: it detaches it from its parent, adds the child and adds it to its parent again. To perform this operation, a compiled XBranchGroup needs the ALLOW_DETACH capability set. In case the XBranchGroup isn't live, the child is attached directly without the procedure described above.

Parameters:
child - object which has to be added as child to the current XBranchGroup

setMyParent

public void setMyParent(Group myParent)

removeAllChildren

public void removeAllChildren()
This method is available since Java 3D 1.3 in a BranchGroup too but not for preceding versions. Therefore XBranchGroup implements it explicitely. It removes all children which can be found attached to the actual BranchGroup


removeChild

public void removeChild(Node child)

cloneNode

public Node cloneNode(boolean flag)