|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.SceneGraphObject
org.j3d.aviatrix3d.Node
org.j3d.aviatrix3d.Group
org.j3d.aviatrix3d.SharedGroup
A grouping node that can have multiple parents, thus allowing a graph structure to the scene graph. Normal nodes cannot have more than one parent, so this class provides the ability to have more than one. In doing so, it overrides the normal methods provided by Node to provide the shared functionality.
Field Summary |
Fields inherited from class org.j3d.aviatrix3d.Group |
childList, dirtyBoundsCount, lastChild, pickFlags, wkVec1, wkVec2 |
Fields inherited from class org.j3d.aviatrix3d.Node |
bounds, implicitBounds, INVALID_BOUNDS, parent |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
alive, updateHandler, WRITE_TIMING_MSG |
Fields inherited from interface org.j3d.aviatrix3d.PickableObject |
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT |
Constructor Summary | |
SharedGroup()
The default constructor |
Method Summary | |
protected void |
checkForCyclicParent(SceneGraphObject child)
Check to see if this node is the same reference as the passed node. |
Node |
getParent()
Overridden to always return null. |
void |
getParents(Node[] parents)
Get the listing of the number of parents that this node currently has. |
protected void |
markBoundsDirty()
Mark this node as having dirty bounds due to one of it's children having their bounds changed. |
int |
numParents()
Request the number of parents this node currently contains |
void |
postRender(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
|
protected void |
removeParent(Node p)
Remove a parent from this shared group. |
void |
render(net.java.games.jogl.GL gl,
net.java.games.jogl.GLU glu)
Set up the rendering state now. |
protected void |
setLive(boolean state)
Notification that this object is live now. |
protected void |
setParent(Node p)
Specify this nodes parent, overridden to provide behaviour that appends the node to the list rather than replacing it. |
protected void |
updateBounds()
Update this node's bounds and then call the parent to update it's bounds. |
Methods inherited from class org.j3d.aviatrix3d.Group |
addChild, checkForCyclicChild, getAllChildren, getChild, getPickMask, getRenderableChild, indexOfChild, numChildren, numRenderableChildren, pickBatch, pickSingle, recomputeBounds, removeAllChildren, removeChild, removeChild, setChild, setPickMask, setUpdateHandler |
Methods inherited from class org.j3d.aviatrix3d.Node |
boundsChanged, getBounds, setBounds |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
dataChanged, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SharedGroup()
Method Detail |
protected void markBoundsDirty()
markBoundsDirty
in class Group
protected void updateBounds()
updateBounds
in class Group
public void render(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
render
in class Node
gl
- The gl context to draw withglu
- The utility context to draw withpublic void postRender(net.java.games.jogl.GL gl, net.java.games.jogl.GLU glu)
postRender
in class Node
protected void setParent(Node p) throws AlreadyParentedException, InvalidNodeTypeException
setParent
in class Node
p
- The new parent instance to add to the list
AlreadyParentedException
- There is a valid parent already set
InvalidNodeTypeException
- Not a group nodeprotected void removeParent(Node p)
removeParent
in class Node
p
- The new parent instance to remove from the listpublic Node getParent()
getParent
in class Node
public int numParents()
public void getParents(Node[] parents)
parents
- An array to copy the parent listing intoprotected void setLive(boolean state)
setLive
in class Group
state
- true if this should be marked as live nowprotected void checkForCyclicParent(SceneGraphObject child) throws CyclicSceneGraphStructureException
checkForCyclicParent
in class Node
child
- The reference to check against this class
CyclicSceneGraphStructureException
- Equal parent and child
|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |