public class Group extends Node
Constructor and Description |
---|
Group() |
Modifier and Type | Method and Description |
---|---|
void |
addChild(Node child)
Adds the specified child node to this group's list of children.
|
protected BoundingSphere |
computeBoundingSphere(boolean finite)
Computes the bounding sphere for this group, including its children.
|
int |
countChildren()
Returns the number of children in this group.
|
protected void |
cull(CullContext cc)
Culls this group.
|
protected void |
draw(DrawContext dc)
Draws this group.
|
protected int |
getAttributeBits()
Gets the OpenGL attribute bits for this group.
|
java.util.Iterator<Node> |
getChildren()
Gets an iterator for the children in this group.
|
void |
pick(PickContext pc)
Picks this group.
|
void |
removeChild(Node child)
Removes the specified child node from this group's list of children.
|
countParents, cullApply, cullBegin, cullEnd, dirtyBoundingSphere, dirtyDraw, drawApply, drawBegin, drawEnd, getBoundingSphere, getParents, getStates, getWorld, isSelected, pickApply, pickBegin, pickEnd, selectedChanged, setSelected, setStates
public void addChild(Node child)
The child must not be a world (root) node, because a world has no parents. Also, if this group is in a world, the child must not already be in a different world. A node cannot be in more than one world at a time; it must be removed from one world before it can be added to another.
child
- the child node.public void removeChild(Node child)
child
- the child node.public int countChildren()
public java.util.Iterator<Node> getChildren()
public void pick(PickContext pc)
protected void cull(CullContext cc)
protected void draw(DrawContext dc)
When culling is applied before drawing, the draw list accumulated in the cull context will draw the child nodes, and this method will never be called.
protected BoundingSphere computeBoundingSphere(boolean finite)
computeBoundingSphere
in class Node
finite
- true, to force bounding sphere to be finite.protected int getAttributeBits()
getAttributeBits
in class Node