|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.SceneGraphObject | +--javax.media.j3d.Node | +--javax.media.j3d.Group
The Group node object is a general-purpose grouping node. Group nodes have exactly one parent and an arbitrary number of children that are rendered in an unspecified order (or in parallel). Null children are allowed; no operation is performed on a null child node. Operations on Group node objects include adding, removing, and enumerating the children of the Group node. The subclasses of Group node add additional semantics.
Field Summary | |
static int |
ALLOW_CHILDREN_EXTEND
Specifies that this Group node allows adding new children. |
static int |
ALLOW_CHILDREN_READ
Specifies that this Group node allows reading its children. |
static int |
ALLOW_CHILDREN_WRITE
Specifies that this Group node allows writing its children. |
static int |
ALLOW_COLLISION_BOUNDS_READ
Specifies that this Group node allows reading its collision Bounds |
static int |
ALLOW_COLLISION_BOUNDS_WRITE
Specifies that this Group node allows writing its collision Bounds |
Fields inherited from class javax.media.j3d.Node |
ALLOW_AUTO_COMPUTE_BOUNDS_READ,
ALLOW_AUTO_COMPUTE_BOUNDS_WRITE,
ALLOW_BOUNDS_READ,
ALLOW_BOUNDS_WRITE,
ALLOW_COLLIDABLE_READ,
ALLOW_COLLIDABLE_WRITE,
ALLOW_LOCAL_TO_VWORLD_READ,
ALLOW_PICKABLE_READ,
ALLOW_PICKABLE_WRITE,
ENABLE_COLLISION_REPORTING,
ENABLE_PICK_REPORTING |
Constructor Summary | |
Group()
Constructs a Group node with default parameters. |
Method Summary | |
void |
addChild(Node child)
Appends the specified child to this node's list of children. |
Node |
cloneNode(boolean forceDuplicate)
Used to create a new instance of the node. |
java.util.Enumeration |
getAllChildren()
Returns an Enumeration object of all children. |
boolean |
getAlternateCollisionTarget()
Returns the collision target state. |
Node |
getChild(int index)
Returns the node's index selected child. |
Bounds |
getCollisionBounds()
Returns the collision bounding object of this node. |
void |
insertChild(Node child,
int index)
Inserts the node's specified child at the specified index location. |
void |
moveTo(BranchGroup branchGroup)
Moves the specified branch group node from its existing location to the end of this node's list of children. |
int |
numChildren()
Returns a count of this nodes' children. |
void |
removeChild(int index)
Removes the node's child at the specified index location. |
void |
setAlternateCollisionTarget(boolean target)
Causes this Group node to be reported as the collision target when collision is being used and this node or any of its children is in a collision. |
void |
setChild(Node child,
int index)
Replaces the node's specified child with the child provided. |
void |
setCollisionBounds(Bounds bounds)
Sets the collision bounds of a node. |
Methods inherited from class javax.media.j3d.Node |
cloneTree,
cloneTree,
cloneTree,
cloneTree,
cloneTree,
cloneTree,
duplicateNode,
getBounds,
getBoundsAutoCompute,
getCollidable,
getLocalToVworld,
getLocalToVworld,
getParent,
getPickable,
setBounds,
setBoundsAutoCompute,
setCollidable,
setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability,
duplicateSceneGraphObject,
getCapability,
getUserData,
isCompiled,
isLive,
setCapability,
setUserData,
updateNodeReferences |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int ALLOW_CHILDREN_READ
public static final int ALLOW_CHILDREN_WRITE
public static final int ALLOW_CHILDREN_EXTEND
public static final int ALLOW_COLLISION_BOUNDS_READ
public static final int ALLOW_COLLISION_BOUNDS_WRITE
Constructor Detail |
public Group()
Method Detail |
public void setCollisionBounds(Bounds bounds)
bounds
- the collision bounding object for a nodepublic Bounds getCollisionBounds()
public void setChild(Node child, int index)
child
- the new childindex
- which child to replace. The index
must
be a value
greater than or equal to 0 and less than numChildren()
.child
has already
been added as a child of another group nodeindex
is invalidpublic void insertChild(Node child, int index)
child
- the new childindex
- at which location to insert. The index
must be a value
greater than or equal to 0 and less than numChildren()
.child
has already
been added as a child of another group node.index
is invalid.public void removeChild(int index)
index
- which child to remove. The index
must be a value
greater than or equal to 0 and less than numChildren()
.index
is invalid.public Node getChild(int index)
index
- which child to return.index
must be a value
greater than or equal to 0 and less than numChildren()
.index
is invalid.public java.util.Enumeration getAllChildren()
public void addChild(Node child)
child
- the child to add to this node's list of childrenchild
has already
been added as a child of another group node.public void moveTo(BranchGroup branchGroup)
branchGroup
- the branch group node to move to this node's list
of childrenpublic int numChildren()
public void setAlternateCollisionTarget(boolean target)
target
- Indicates whether this Group node can be the target
of a collision.WakeupOnCollisionEntry
,
WakeupOnCollisionMovement
,
WakeupOnCollisionExit
public boolean getAlternateCollisionTarget()
public Node cloneNode(boolean forceDuplicate)
cloneTree
to duplicate the current node.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.Node.cloneTree()
,
Node.cloneNode(boolean)
,
Node.duplicateNode(javax.media.j3d.Node, boolean)
,
NodeComponent.setDuplicateOnCloneTree(boolean)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |