|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.aviatrix3d.SceneGraphObject org.j3d.aviatrix3d.Node
public abstract class Node
A Node class is the base class for all renderable nodes in the SceneGraph.
Unless otherwise overridden, all nodes are only single parented and have a bounds object. By default the bounds are void (ie not even a point in space) and do not contribute this node to the scene graph's bounds.
Internationalisation Resource Names
Field Summary | |
---|---|
protected BoundingVolume |
bounds
Bounding volume set by the user |
protected boolean |
implicitBounds
Was the bounds automatically calculated? |
protected static BoundingVoid |
INVALID_BOUNDS
Sharable version of the null bounds object for those that need it |
protected Node |
parent
The parent of this node |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
Constructor Summary | |
---|---|
protected |
Node()
Construct a new instance of this node, with implicit bounds calculation. |
Method Summary | |
---|---|
void |
boundsChanged(NodeUpdateListener l)
Notify the node that you have updates to the node that might alter its bounds. |
protected void |
checkForCyclicParent(SceneGraphObject child)
Check to see if this node is the same reference as the passed node. |
BoundingVolume |
getBounds()
Get the currently set bounds for this object. |
Node |
getParent()
Get the current parent of this node. |
protected void |
markBoundsDirty()
Mark this node as having dirty bounds due to one of it's children having their bounds changed. |
protected void |
recomputeBounds()
Internal method to recalculate the implicit bounds of this Node. |
protected void |
removeParent(Node p)
Remove a parent from this node. |
void |
requestBoundsUpdate()
Request a recomputation of the bounds of this object. |
void |
setBounds(BoundingVolume b)
Set the bounds to the given explicit value. |
protected void |
setParent(Node p)
Specify this nodes parent. |
protected void |
updateBounds()
Update this node's bounds. |
protected void |
updateParentBounds()
Update this node's parent bounds now. |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
checkForCyclicChild, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setLive, setUpdateHandler, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final BoundingVoid INVALID_BOUNDS
protected Node parent
protected BoundingVolume bounds
protected boolean implicitBounds
Constructor Detail |
---|
protected Node()
Method Detail |
---|
protected void checkForCyclicParent(SceneGraphObject child) throws CyclicSceneGraphStructureException
checkForCyclicParent
in class SceneGraphObject
child
- The reference to check against this class
CyclicSceneGraphStructureException
- Equal parent and childprotected void setParent(Node p) throws AlreadyParentedException
p
- The new parent instance to call or null
AlreadyParentedException
- There is a valid parent already setprotected void removeParent(Node p)
p
- The new parent instance to remove from the listpublic Node getParent()
public void boundsChanged(NodeUpdateListener l) throws InvalidListenerSetTimingException
l
- The change requestor
InvalidListenerSetTimingException
- If called when the node is not live or
if called during one of the bounds/data changed callbackspublic void setBounds(BoundingVolume b)
b
- The new bounds to use or null to clear
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener bounds changed callback methodpublic BoundingVolume getBounds()
protected void updateBounds()
protected void updateParentBounds()
protected void recomputeBounds()
public void requestBoundsUpdate()
This will recurse down the children asking all of them to recompute the bounds. If a child is found to be during this process, that branch will not update, and thus the value used will be the last updated (ie from the previous frame it was processed).
The default implementation in this class does nothing. A derived class should override and implement as needed.
protected void markBoundsDirty()
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |