|
||||||||||
| 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
public abstract class Node
Node is the base class for all node objects in a scene graph.
| Field Summary | |
|---|---|
protected org.openmali.spatial.bounds.Bounds |
bounds
The bounds of this object. |
protected boolean |
boundsAutoCompute
|
protected boolean |
boundsDirty
|
protected static boolean |
globalIgnoreBounds
|
protected BoundsTypeHint |
instanceBoundsTypeHint
|
protected GroupNode |
parent
The parent of this node. |
protected TransformGroup |
transformGroup
Transform group for this node. |
protected org.openmali.spatial.bounds.Bounds |
untransformedBounds
|
| Fields inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
XITH3D_USERDATAKEY_OLDUSERDATA |
| Constructor Summary | |
|---|---|
|
Node()
Constructs a new Node object. |
protected |
Node(boolean initializeBounds)
Constructs a new Node object. |
| Method Summary | |
|---|---|
void |
absorbDetails(Node node)
Turns the receiver into a shared copy of the node parameter. |
Node |
cloneNode(boolean forceDuplicate)
Creates a new instance of the Node. |
void |
detach()
Detaches the Node from its parent and sets the node to not live. |
protected abstract void |
dump(int indent)
|
void |
duplicateNode(Node originalNode,
boolean forceDuplicate)
Copies all the node information from the originalNode into the current node. |
void |
freeOpenGLResources(Canvas3D canvas)
This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group). |
abstract void |
freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all Nodes in the traversal of this Node(-Group). |
org.openmali.spatial.bounds.Bounds |
getBounds()
|
boolean |
getBoundsAutoCompute()
|
org.openmali.spatial.bounds.BoundsType |
getBoundsType()
|
static BoundsTypeHint |
getBoundsTypeHint()
|
static boolean |
getDefaultPickable()
Is a Node object pickable when created? |
protected java.lang.String |
getIndentString(int indent)
|
InheritedNodeAttributes |
getInheritedNodeAttributes()
|
ScenegraphModificationsListener |
getModListener()
|
Node |
getOrderedChild()
|
OrderedState |
getOrderedState()
|
GroupNode |
getParent()
|
BranchGroup |
getRoot()
|
java.lang.Object |
getShadowAttachment()
|
boolean |
getShowBounds()
|
TransformGroup |
getTransformGroup()
Returns the TransformGroup, which defines the Transform of this Node. |
java.lang.Object |
getTreeCell()
|
org.openmali.spatial.bounds.Bounds |
getWorldBounds()
|
Transform3D |
getWorldTransform()
|
void |
getWorldTransform(Transform3D transform3D)
|
boolean |
isBillboard()
|
boolean |
isIgnoreBounds()
|
boolean |
isOccluder()
|
boolean |
isPickable()
|
boolean |
isRenderable()
|
boolean |
isUpdatableNode()
|
protected void |
mergeInheritedClipper(Clipper clipper,
ClipperInfo clipperInfo)
|
protected void |
mergeInheritedNodes(InheritedNodeAttributes in)
|
protected void |
mergeInheritedScissorRect(ScissorRect scissorRect)
|
static boolean |
popGlobalIgnoreBounds()
|
void |
printBounds(boolean childrenToo)
|
static void |
pushGlobalIgnoreBounds(boolean val)
|
void |
setBounds(org.openmali.spatial.bounds.Bounds bounds)
Sets the bounds for this object. |
void |
setBoundsAutoCompute(boolean autocompute)
|
protected void |
setBoundsDirty()
|
protected void |
setBoundsDirtyUpward()
|
static void |
setBoundsTypeHint(BoundsTypeHint bth)
|
static void |
setDefaultPickable(boolean value)
Each Node object will be pickable by default following this static flag. |
static void |
setGlobalIgnoreBounds(boolean val)
|
void |
setIgnoreBounds(boolean ignoreBounds)
|
void |
setIsOccluder(boolean isOccluder)
|
void |
setModListener(ScenegraphModificationsListener modListener)
|
void |
setOrderedChild(Node orderedChild)
|
protected void |
setParent(GroupNode parent)
Sets the parent for this Node object. |
void |
setPickable(boolean value)
Sets whether this Node is attended by picking algorithms. |
void |
setPickableRecursive(boolean pickable)
Sets whether this Node is attended by picking algorithms, and all its children. |
static void |
setPickableRecursive(Node node,
boolean pickable)
Sets whether this Node is attended by picking algorithms, and all its children |
void |
setRenderable(boolean value)
Sets whether this Node is excluded from rendering or not. |
void |
setShadowAttachment(java.lang.Object shadowAttachment)
|
void |
setShowBounds(boolean show)
|
protected void |
setTransformGroup(TransformGroup tg)
|
void |
setTreeCell(java.lang.Object treeCell)
|
Node |
sharedCopy()
Creates a shared copy of this Node. |
Node |
sharedCopy(CopyListener listener)
Creates a shared copy of this Node. |
abstract boolean |
traverse(DetailedTraversalCallback callback)
Traverses the scenegraph from this node on. |
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. |
protected void |
updateOrderedChild()
Steps down from the nodes. |
void |
updateTransformGroup()
Never use this method on your own! |
void |
updateWorldTransform()
If this is a TansformGroup, then it will multiply the transform against the parent transform and store it into the world-transform matrix. |
| Methods inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, 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 transient GroupNode parent
protected transient boolean boundsAutoCompute
protected TransformGroup transformGroup
protected org.openmali.spatial.bounds.Bounds bounds
protected org.openmali.spatial.bounds.Bounds untransformedBounds
protected BoundsTypeHint instanceBoundsTypeHint
protected boolean boundsDirty
protected static boolean globalIgnoreBounds
| Constructor Detail |
|---|
protected Node(boolean initializeBounds)
public Node()
| Method Detail |
|---|
public void setTreeCell(java.lang.Object treeCell)
setTreeCell in interface org.openmali.spatial.SpatialNodepublic java.lang.Object getTreeCell()
getTreeCell in interface org.openmali.spatial.SpatialNodepublic static void setBoundsTypeHint(BoundsTypeHint bth)
public static BoundsTypeHint getBoundsTypeHint()
public final boolean isBillboard()
public final boolean isUpdatableNode()
public static boolean getDefaultPickable()
public void setPickable(boolean value)
value - if false, this Node is ignored by picking algorithmspublic final boolean isPickable()
public static final void setPickableRecursive(Node node,
boolean pickable)
pickable - if false, this Node and all its children, recursively,
are ignored by picking algorithmspublic final void setPickableRecursive(boolean pickable)
pickable - if false, this Node and all its children, recursively
are ignored by picking algorithmspublic final void setRenderable(boolean value)
value - if false, this Node is excluded from renderingpublic final boolean isRenderable()
public final InheritedNodeAttributes getInheritedNodeAttributes()
public void setModListener(ScenegraphModificationsListener modListener)
public final ScenegraphModificationsListener getModListener()
public void setIgnoreBounds(boolean ignoreBounds)
public final boolean isIgnoreBounds()
public static void setGlobalIgnoreBounds(boolean val)
public static void pushGlobalIgnoreBounds(boolean val)
public static boolean popGlobalIgnoreBounds()
protected void mergeInheritedNodes(InheritedNodeAttributes in)
protected void unmergeInheritedNodes(InheritedNodeAttributes in)
protected void unmergeInheritedLight(Light light)
protected void unmergeInheritedFog(Fog fog)
protected void mergeInheritedScissorRect(ScissorRect scissorRect)
protected void mergeInheritedClipper(Clipper clipper,
ClipperInfo clipperInfo)
public final void setBoundsAutoCompute(boolean autocompute)
public final boolean getBoundsAutoCompute()
public final void getWorldTransform(Transform3D transform3D)
public Transform3D getWorldTransform()
public final boolean getShowBounds()
public void setShowBounds(boolean show)
public void setBounds(org.openmali.spatial.bounds.Bounds bounds)
public final org.openmali.spatial.bounds.BoundsType getBoundsType()
public final org.openmali.spatial.bounds.Bounds getWorldBounds()
getWorldBounds in interface org.openmali.spatial.SpatialNodepublic final org.openmali.spatial.bounds.Bounds getBounds()
public final GroupNode getParent()
public final BranchGroup getRoot()
public final Node getOrderedChild()
public final void setOrderedChild(Node orderedChild)
public final OrderedState getOrderedState()
protected final void setTransformGroup(TransformGroup tg)
public final TransformGroup getTransformGroup()
protected void setBoundsDirty()
protected void setBoundsDirtyUpward()
public final void detach()
protected void setParent(GroupNode parent)
IllegalSceneGraphOperation - if the Node already has a parentpublic void printBounds(boolean childrenToo)
protected void updateBoundsCheap(boolean onlyDirty,
boolean childrenToo,
boolean parentToo,
boolean onlyWorld)
onlyDirty - 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)
onlyDirty - Only update those nodes which have been marked as dirty.public final void setIsOccluder(boolean isOccluder)
public final boolean isOccluder()
public final void setShadowAttachment(java.lang.Object shadowAttachment)
public final java.lang.Object getShadowAttachment()
public void updateWorldTransform()
public final void updateTransformGroup()
protected final void updateOrderedChild()
public Node cloneNode(boolean forceDuplicate)
public void duplicateNode(Node originalNode,
boolean forceDuplicate)
public Node sharedCopy(CopyListener listener)
listener -
absorbDetails(Node)public Node sharedCopy()
absorbDetails(Node)public void absorbDetails(Node node)
node - the node to copy.sharedCopy()public static void setDefaultPickable(boolean value)
value - pickable by default?public abstract void freeOpenGLResources(CanvasPeer canvasPeer)
canvasPeer - public final void freeOpenGLResources(Canvas3D canvas)
canvas - protected final java.lang.String getIndentString(int indent)
protected abstract void dump(int indent)
public boolean traverse(TraversalCallback callback)
callback - the listener is notified of any traversed Node on the way
public abstract boolean traverse(DetailedTraversalCallback callback)
callback - the listener is notified of any traversed Node on the way
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||