All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.Group

java.lang.Object
   |
   +----java.media.j3d.SceneGraphObject
           |
           +----java.media.j3d.Node
                   |
                   +----java.media.j3d.Group

public class Group
extends Node
Group object.


Variable Index

 o ALLOW_CHILDREN_EXTEND
Specifies that this Group node allows adding new children.
 o ALLOW_CHILDREN_READ
Specifies that this Group node allows reading its children.
 o ALLOW_CHILDREN_WRITE
Specifies that this Group node allows writing its children.
 o ALLOW_COLLISION_BOUNDS_READ
Specifies that this Group node allows reading its collision Bounds
 o ALLOW_COLLISION_BOUNDS_WRITE
Specifies that this Group node allows writing its collision Bounds

Constructor Index

 o Group()
creates a new Group Node object

Method Index

 o addChild(Node)
Appends the specified child to this node's list of children.
 o cloneNode(boolean)
Used to create a new instance of the node.
 o cloneTree(boolean, boolean)
Duplicates all the nodes of the specified sub-graph.
 o duplicateNode(Node, boolean)
Copies all node information from originalNode into the current node.
 o getAllChildren()
Returns an Enumeration object of all children.
 o getChild(int)
Returns the node's index selected child.
 o getCollisionBounds()
Returns the collision bounding object of this node.
 o insertChild(Node, int)
Inserts the node's specified child at the specified index location.
 o moveTo(BranchGroup)
Moves the specified branch group node from its existing location to the end of this node's list of children.
 o numChildren()
Returns a count of this nodes' children.
 o removeChild(int)
Removes the node's child at the specified index location.
 o setChild(Node, int)
Replaces the node's specified child with the child provided.
 o setCollisionBounds(Bounds)
Sets the collision bounds of a node.

Variables

 o ALLOW_CHILDREN_READ
 public static final int ALLOW_CHILDREN_READ
Specifies that this Group node allows reading its children.

 o ALLOW_CHILDREN_WRITE
 public static final int ALLOW_CHILDREN_WRITE
Specifies that this Group node allows writing its children.

 o ALLOW_CHILDREN_EXTEND
 public static final int ALLOW_CHILDREN_EXTEND
Specifies that this Group node allows adding new children.

 o ALLOW_COLLISION_BOUNDS_READ
 public static final int ALLOW_COLLISION_BOUNDS_READ
Specifies that this Group node allows reading its collision Bounds

 o ALLOW_COLLISION_BOUNDS_WRITE
 public static final int ALLOW_COLLISION_BOUNDS_WRITE
Specifies that this Group node allows writing its collision Bounds

Constructors

 o Group
 public Group()
creates a new Group Node object

Methods

 o setCollisionBounds
 public final void setCollisionBounds(Bounds bounds)
Sets the collision bounds of a node.

Parameters:
bounds - the collision bounding object for a node
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o getCollisionBounds
 public final Bounds getCollisionBounds()
Returns the collision bounding object of this node.

Returns:
the node's collision bounding object
Throws: CapabilityNotSetException
if appropriate capability is not set and this object is part of live or compiled scene graph
 o setChild
 public final void setChild(Node child,
                            int index)
Replaces the node's specified child with the child provided.

Parameters:
child - the new child
index - which child to replace
Throws: CapabilityNotSetException
if the appropriate capability is not set and this group node is part of live or compiled scene graph
Throws: RestrictedAccessException
if this group node is part of live or compiled scene graph and the child node being set is not a BranchGroup node
Throws: MultipleParentException
if 'child' has already been added as a child of another group node.
 o insertChild
 public final void insertChild(Node child,
                               int index)
Inserts the node's specified child at the specified index location.

Parameters:
child - the new child
index - at which location to insert
Throws: CapabilityNotSetException
if the appropriate capability is not set and this group node is part of live or compiled scene graph
Throws: RestrictedAccessException
if this group node is part of live or compiled scene graph and the child node being inserted is not a BranchGroup node
Throws: MultipleParentException
if 'child' has already been added as a child of another group node.
 o removeChild
 public final void removeChild(int index)
Removes the node's child at the specified index location.

Parameters:
index - which child to remove
Throws: CapabilityNotSetException
if the appropriate capability is not set and this group node is part of live or compiled scene graph
Throws: RestrictedAccessException
if this group node is part of live or compiled scene graph and the child node being removed is not a BranchGroup node
 o getChild
 public final Node getChild(int index)
Returns the node's index selected child.

Parameters:
index - which child to return
Returns:
the children at location index
Throws: CapabilityNotSetException
if the appropriate capability is not set and this group node is part of live or compiled scene graph
 o getAllChildren
 public final Enumeration getAllChildren()
Returns an Enumeration object of all children.

Returns:
an Enumeration object of all the children
Throws: CapabilityNotSetException
if the appropriate capability is not set and this group node is part of live or compiled scene graph
 o addChild
 public final void addChild(Node child)
Appends the specified child to this node's list of children.

Parameters:
child - the child to add to this node's list of children
Throws: CapabilityNotSetException
if the appropriate capability is not set and this group node is part of live or compiled scene graph
Throws: RestrictedAccessException
if this group node is part of live or compiled scene graph and the child node being added is not a BranchGroup node
Throws: MultipleParentException
if 'child' has already been added as a child of another group node.
 o moveTo
 public final void moveTo(BranchGroup branchGroup)
Moves the specified branch group node from its existing location to the end of this node's list of children.

Parameters:
branchGroup - the branch group node to move to this node's list of children
Throws: CapabilityNotSetException
if the appropriate capability is not set and this group node is part of live or compiled scene graph
 o numChildren
 public final int numChildren()
Returns a count of this nodes' children.

Returns:
the number of children descendant from this node.
Throws: CapabilityNotSetException
if the appropriate capability is not set and this group node is part of live or compiled scene graph
 o cloneTree
 public Node cloneTree(boolean forceDuplicate,
                       boolean allowDanglingReference)
Duplicates all the nodes of the specified sub-graph. For Group Nodes the group node is duplicated via a call to cloneNode and then cloneTree is called for each child node. For Leaf Nodes, component data can either be duplicated or be made a reference to the original data. Leaf Node cloneTree behavior is determined by the duplicateOnCloneTree flag found in every Leaf Node's component data class and by the forceDuplicate paramter.

Parameters:
forceDuplicate - when set to true, causes the duplicateOnCloneTree flag to be ignored. When false, the value of each node's duplicateOnCloneTree determines whether data is duplicated or copied.
allowDanglingReferences - when set to true allows the cloneTree method to complete even whan a dangling reference is discovered. When this parameter is false a DanglingReferenceException is generated as soon as cloneTree detects this situation.
Returns:
a reference to the cloned scene graph.
Throws: DanglingReferenceException
When a dangling reference is discovered during the cloneTree operation and the allowDanglingReference parameter is false.
Overrides:
cloneTree in class Node
See Also:
setDuplicateOnCloneTree
 o cloneNode
 public Node cloneNode(boolean forceDuplicate)
Used to create a new instance of the node. This routine is called by cloneTree to duplicate the current node.

Parameters:
forceDuplicate - when set to true, causes the duplicateOnCloneTree flag to be ignored. When false, the value of each node's duplicateOnCloneTree variable determines whether NodeComponent data is duplicated or copied.
Overrides:
cloneNode in class Node
See Also:
cloneTree, cloneNode, duplicateNode, setDuplicateOnCloneTree
 o duplicateNode
 public void duplicateNode(Node originalNode,
                           boolean forceDuplicate)
Copies all node information from originalNode into the current node. This method is called from the cloneNode method which is, in turn, called by the cloneTree method.

For any NodeComponent objects contained by the object being duplicated, each NodeComponent object's duplicateOnCloneTree value is used to determine whether the NodeComponent should be duplicated in the new node or if just a reference to the current node should be placed in the new node. This flag can be overridden by setting the forceDuplicate parameter in the cloneTree method to true.

Parameters:
originalNode - the original node to duplicate.
forceDuplicate - when set to true, causes the duplicateOnCloneTree flag to be ignored. When false, the value of each node's duplicateOnCloneTree variable determines whether NodeComponent data is duplicated or copied.
Overrides:
duplicateNode in class Node
See Also:
cloneNode, duplicateNode, cloneTree, setDuplicateOnCloneTree

All Packages  Class Hierarchy  This Package  Previous  Next  Index