|
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 org.j3d.aviatrix3d.Node2D org.j3d.aviatrix3d.Group2D org.j3d.aviatrix3d.SharedGroup2D
public class SharedGroup2D
A grouping 2D 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 Node2D to provide the shared functionality.
Internationalisation Resource Names
Field Summary |
---|
Fields inherited from class org.j3d.aviatrix3d.Group2D |
---|
childList, cullList, dirtyBoundsCount, lastChild, pickableList, 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, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
Fields inherited from interface org.j3d.aviatrix3d.picking.PickableObject |
---|
COLLIDABLE_OBJECT, GENERAL_OBJECT, PROXIMITY_OBJECT, VISIBLE_OBJECT |
Fields inherited from interface org.j3d.aviatrix3d.picking.PickTarget |
---|
CUSTOM_PICK_TYPE, GROUP_PICK_TYPE, LEAF_PICK_TYPE, SINGLE_PICK_TYPE |
Constructor Summary | |
---|---|
SharedGroup2D()
The default constructor |
Method Summary | |
---|---|
protected void |
checkForCyclicParent(SceneGraphObject child)
Check to see if this node is the same reference as the passed node. |
Cullable |
getCullableParent()
Get the parent cullable of this instance. |
Node |
getParent()
Overridden to always return the current first parent in the list. |
void |
getParents(Node2D[] parents)
Get the listing of the number of parents that this node currently has. |
boolean |
hasMultipleParents()
Check to see if this cullable is mulitparented. |
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 |
protected void |
removeParent(Node p)
Remove a parent from this shared group. |
protected void |
setLive(boolean state)
Notification that this object is live now. |
void |
setLive(Node caller,
boolean state)
Overloaded version of the notification that this object's liveness state has changed. |
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.Group2D |
---|
addChild, checkForCyclicChild, checkPickMask, getAllChildren, getChild, getCullableChildren, getPickableBounds, getPickableChild, getPickableChildren, getPickMask, getPickTargetType, indexOfChild, numChildren, numCullableChildren, numPickableChildren, pickBatch, pickSingle, recomputeBounds, removeAllChildren, removeChild, removeChild, requestBoundsUpdate, setBounds, setChild, setPickMask, setUpdateHandler |
Methods inherited from class org.j3d.aviatrix3d.Node |
---|
boundsChanged, getBounds, updateParentBounds |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.j3d.aviatrix3d.rendering.GroupCullable |
---|
getBounds |
Constructor Detail |
---|
public SharedGroup2D()
Method Detail |
---|
public boolean hasMultipleParents()
hasMultipleParents
in interface GroupCullable
hasMultipleParents
in class Group2D
public Cullable getCullableParent()
getCullableParent
in interface GroupCullable
getCullableParent
in class Group2D
public void setLive(Node caller, boolean state)
caller
- The node calling us with the state changesstate
- true if this should be marked as live nowprotected void markBoundsDirty()
markBoundsDirty
in class Group2D
protected void updateBounds()
updateBounds
in class Group2D
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
protected void setLive(boolean state)
setLive
in class Group2D
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 childpublic int numParents()
public void getParents(Node2D[] parents)
parents
- An array to copy the parent listing into
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |