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.
-
ALLOW_CHILDREN_EXTEND
- Specifies that this Group node allows adding new children.
-
ALLOW_CHILDREN_READ
- Specifies that this Group node allows reading its children.
-
ALLOW_CHILDREN_WRITE
- Specifies that this Group node allows writing its children.
-
ALLOW_COLLISION_BOUNDS_READ
- Specifies that this Group node allows reading its collision Bounds
-
ALLOW_COLLISION_BOUNDS_WRITE
- Specifies that this Group node allows writing its collision Bounds
-
Group()
- creates a new Group Node object
-
addChild(Node)
- Appends the specified child to this node's list of children.
-
cloneNode(boolean)
- Used to create a new instance of the node.
-
cloneTree(boolean, boolean)
- Duplicates all the nodes of the specified sub-graph.
-
duplicateNode(Node, boolean)
- Copies all node information from
originalNode
into
the current node.
-
getAllChildren()
- Returns an Enumeration object of all children.
-
getChild(int)
- Returns the node's index selected child.
-
getCollisionBounds()
- Returns the collision bounding object of this node.
-
insertChild(Node, int)
- Inserts the node's specified child at the specified index location.
-
moveTo(BranchGroup)
- Moves the specified branch group node from its existing location to
the end of this node's list of children.
-
numChildren()
- Returns a count of this nodes' children.
-
removeChild(int)
- Removes the node's child at the specified index location.
-
setChild(Node, int)
- Replaces the node's specified child with the child provided.
-
setCollisionBounds(Bounds)
- Sets the collision bounds of a node.
ALLOW_CHILDREN_READ
public static final int ALLOW_CHILDREN_READ
- Specifies that this Group node allows reading its children.
ALLOW_CHILDREN_WRITE
public static final int ALLOW_CHILDREN_WRITE
- Specifies that this Group node allows writing its children.
ALLOW_CHILDREN_EXTEND
public static final int ALLOW_CHILDREN_EXTEND
- Specifies that this Group node allows adding new children.
ALLOW_COLLISION_BOUNDS_READ
public static final int ALLOW_COLLISION_BOUNDS_READ
- Specifies that this Group node allows reading its collision Bounds
ALLOW_COLLISION_BOUNDS_WRITE
public static final int ALLOW_COLLISION_BOUNDS_WRITE
- Specifies that this Group node allows writing its collision Bounds
Group
public Group()
- creates a new Group Node object
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
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
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.
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.
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
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
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
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.
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
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
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
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
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