|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.Node
org.xith3d.scenegraph.GroupNode
public abstract class GroupNode
A Node, that can hold a list of child Nodes.
| Field Summary | |
|---|---|
protected Node[] |
children
The list of children nodes in this Group. |
protected GroupNode |
hostGroup
|
protected int |
numChildren
|
protected long |
totalNumChildren
|
protected long |
totalNumShapes
|
| Fields inherited from class org.xith3d.scenegraph.Node |
|---|
bounds, boundsAutoCompute, boundsDirty, globalIgnoreBounds, instanceBoundsTypeHint, transformGroup, untransformedBounds |
| Fields inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
XITH3D_USERDATAKEY_OLDUSERDATA |
| Constructor Summary | |
|---|---|
GroupNode()
Constructs a new Group object. |
|
GroupNode(GroupNode hostGroup)
Constructs a new Group object. |
|
| Method Summary | ||
|---|---|---|
void |
absorbDetails(Node node)
Turns the receiver into a shared copy of the node parameter. |
|
void |
addChild(Node child)
Add a child to the group as the last child in the group. |
|
void |
addChild(Node child,
int index)
Insert a child at the specified index. |
|
protected void |
checkChild(Node child,
int index)
|
|
void |
dump()
Dumps this Group and it's children to stdout. |
|
protected void |
dump(int indent)
|
|
protected boolean |
ensureCapacity(int minCapacity)
|
|
protected void |
expandBounds(Node node,
boolean forceNodeUpdate)
|
|
|
findAll(java.lang.Class<NT> searchedClass)
|
|
java.util.List<Node> |
findAll(java.lang.String name)
|
|
|
findFirst(java.lang.Class<NT> searchedClass)
|
|
Node |
findFirst(java.lang.String name)
|
|
void |
freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group). |
|
Node |
getChild(int index)
|
|
java.util.ArrayList<Node> |
getChildren()
Deprecated. use numChildren() and getChild(int) instead. |
|
|
getChildren(L list)
Fills this group's children into the given list. |
|
Clipper |
getClipper()
|
|
GroupNode |
getPickHost()
|
|
ScissorRect |
getScissorRect()
|
|
long |
getTotalNumChildren()
|
|
long |
getTotalNumShapes()
|
|
int |
indexOf(Node child)
|
|
boolean |
isPickHost()
|
|
protected void |
mergeInheritedClipper(Clipper clipper,
ClipperInfo clipperInfo)
|
|
protected void |
mergeInheritedNodes(InheritedNodeAttributes in)
|
|
protected void |
mergeInheritedScissorRect(ScissorRect scissorRect)
|
|
protected abstract GroupNode |
newInstance()
|
|
int |
numChildren()
Get the number of children in this group. |
|
void |
removeAllChildren()
Removes all the children of this group. |
|
Node |
removeChild(int index)
Remove the child at the specified index. |
|
int |
removeChild(Node child)
Remove a child from the group. |
|
protected void |
setBoundsDirty()
|
|
protected void |
setBoundsDirtyUpward()
|
|
Node |
setChild(Node child,
int index)
Set the child at the specified index. |
|
void |
setClipper(Clipper clipper)
Sets this Group's Clipper |
|
protected boolean |
setLive(boolean live)
Sets the live state of the object |
|
void |
setPickHost(boolean isPickHost)
Sets this Group to be a pick-host or not. |
|
protected void |
setPickHost(GroupNode pickHost)
Recursively searches for (grand-)children to set the pick-host property. |
|
void |
setScissorRect(ScissorRect scissorRect)
Sets this Group's ScissorRect |
|
void |
setShowBounds(boolean show,
boolean childrenToo)
|
|
GroupNode |
sharedCopy()
Creates a shared copy of this Node. |
|
GroupNode |
sharedCopy(CopyListener listener)
Creates a shared copy of this Node. |
|
boolean |
traverse(TraversalCallback callback)
Traverses the scenegraph from this node on. |
|
protected void |
unmergeInheritedFog(Fog fog)
|
|
protected void |
unmergeInheritedLight(Light light)
|
|
protected void |
unmergeInheritedNodes(InheritedNodeAttributes in)
|
|
void |
updateBounds(boolean onlyDirty)
Update bounds sets the bounds and virutal world bounds of all nodes recursively. |
|
protected void |
updateBoundsCheap(boolean onlyDirty,
boolean childrenToo,
boolean parentToo,
boolean onlyWorld)
Update bounds sets the bounds and virutal world bounds of all nodes recursively. |
|
| Methods inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
getName, getUserData, getUserData, getUserDataMap, isLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final GroupNode hostGroup
protected Node[] children
protected int numChildren
protected long totalNumChildren
protected long totalNumShapes
| Constructor Detail |
|---|
public GroupNode(GroupNode hostGroup)
hostGroup - the group to be forwarded all the add/remove methods.public GroupNode()
| Method Detail |
|---|
protected boolean setLive(boolean live)
setLive in class SceneGraphObjecttrue, if the state has changedprotected void setPickHost(GroupNode pickHost)
pickHost - the GroupNode, which serves as the pick-hostpublic final GroupNode getPickHost()
public void setPickHost(boolean isPickHost)
isPickHost - Leaf.getPickHost()public boolean isPickHost()
Leaf.getPickHost()
protected final void checkChild(Node child,
int index)
protected void mergeInheritedNodes(InheritedNodeAttributes in)
mergeInheritedNodes in class Nodeprotected void unmergeInheritedNodes(InheritedNodeAttributes in)
unmergeInheritedNodes in class Nodeprotected void unmergeInheritedLight(Light light)
unmergeInheritedLight in class Nodeprotected void unmergeInheritedFog(Fog fog)
unmergeInheritedFog in class Nodeprotected boolean ensureCapacity(int minCapacity)
public void addChild(Node child,
int index)
public final void addChild(Node child)
public Node removeChild(int index)
public final int indexOf(Node child)
child -
public final int removeChild(Node child)
public void removeAllChildren()
public Node setChild(Node child,
int index)
child - index -
public final Node getChild(int index)
public final int numChildren()
public final long getTotalNumChildren()
public final long getTotalNumShapes()
public final <L extends java.util.List<Node>> L getChildren(L list)
list - @Deprecated public java.util.ArrayList<Node> getChildren()
numChildren() and getChild(int) instead.
protected void setBoundsDirtyUpward()
setBoundsDirtyUpward in class Nodeprotected void setBoundsDirty()
setBoundsDirty in class Node
protected final void expandBounds(Node node,
boolean forceNodeUpdate)
node - forceNodeUpdate -
protected void updateBoundsCheap(boolean onlyDirty,
boolean childrenToo,
boolean parentToo,
boolean onlyWorld)
updateBoundsCheap in class NodeonlyDirty - Only update those nodes which have been marked as dirty.childrenToo - if false, the children bounds are not updatedparentToo - if false, the parent Node will not be updatedonlyWorld - if true, only the vworld bounds are updatedpublic void updateBounds(boolean onlyDirty)
updateBounds in class NodeonlyDirty - Only update those nodes which have been marked as dirty.
public void setShowBounds(boolean show,
boolean childrenToo)
protected void mergeInheritedScissorRect(ScissorRect scissorRect)
mergeInheritedScissorRect in class Nodepublic void setScissorRect(ScissorRect scissorRect)
scissorRect - the new ScissorRectpublic final ScissorRect getScissorRect()
protected void mergeInheritedClipper(Clipper clipper,
ClipperInfo clipperInfo)
mergeInheritedClipper in class Nodepublic void setClipper(Clipper clipper)
clipper - the new Clipperpublic final Clipper getClipper()
protected abstract GroupNode newInstance()
sharedCopy(CopyListener)public GroupNode sharedCopy(CopyListener listener)
sharedCopy in class NodeNode.absorbDetails(Node)public GroupNode sharedCopy()
sharedCopy in class NodeNode.absorbDetails(Node)public void absorbDetails(Node node)
absorbDetails in class Nodenode - the node to copy.Node.sharedCopy()protected void dump(int indent)
dump in class Nodepublic void dump()
public void freeOpenGLResources(CanvasPeer canvasPeer)
freeOpenGLResources in class Nodepublic boolean traverse(TraversalCallback callback)
traverse in class Nodecallback - the listener is notified of any traversed Node on the way
public Node findFirst(java.lang.String name)
name - the name to be searched for
public java.util.List<Node> findAll(java.lang.String name)
name - the name to be searched for
public <NT extends Node> NT findFirst(java.lang.Class<NT> searchedClass)
searchedClass - the class to search for
public <NT extends Node> java.util.List<NT> findAll(java.lang.Class<NT> searchedClass)
searchedClass - the class to search for
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||