|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.j3d.SceneGraphObject | +--javax.media.j3d.Node | +--javax.media.j3d.Leaf | +--javax.media.j3d.Behavior
Behavior is an abstract class that contains the framework for all behavioral components in Java 3D.
Fields inherited from class javax.media.j3d.Node |
ALLOW_AUTO_COMPUTE_BOUNDS_READ,
ALLOW_AUTO_COMPUTE_BOUNDS_WRITE,
ALLOW_BOUNDS_READ,
ALLOW_BOUNDS_WRITE,
ALLOW_COLLIDABLE_READ,
ALLOW_COLLIDABLE_WRITE,
ALLOW_LOCAL_TO_VWORLD_READ,
ALLOW_PICK,
ALLOW_PICKABLE_READ,
ALLOW_PICKABLE_WRITE,
ENABLE_COLLISION_REPORTING,
ENABLE_PICK_REPORTING |
Constructor Summary | |
Behavior()
Constructs a Behavior node with default parameters. |
Method Summary | |
void |
duplicateNode(Node originalNode,
boolean forceDuplicate)
Copies all node information from originalNode into
the current node. |
boolean |
getEnable()
Retrieves the state of the Behavior enable flag. |
BoundingLeaf |
getSchedulingBoundingLeaf()
Retrieves the Behavior node's scheduling bounding leaf. |
Bounds |
getSchedulingBounds()
Retrieves the Behavior node's scheduling bounds. |
protected View |
getView()
Returns the primary view associated with this behavior. |
abstract void |
initialize()
Initialize this behavior. |
void |
postId(int postId)
Post the specified Id. |
abstract void |
processStimulus(java.util.Enumeration criteria)
Process a stimulus meant for this behavior. |
void |
setEnable(boolean state)
Enables or disables this Behavior. |
void |
setSchedulingBoundingLeaf(BoundingLeaf region)
Set the Behavior's scheduling region to the specified bounding leaf. |
void |
setSchedulingBounds(Bounds region)
Set the Behavior's scheduling region to the specified bounds. |
void |
updateNodeReferences(NodeReferenceTable referenceTable)
Callback used to allow a node to check if any scene graph objects referenced by that node have been duplicated via a call to cloneTree . |
protected void |
wakeupOn(WakeupCondition criteria)
Defines this behavior's wakeup criteria. |
Methods inherited from class javax.media.j3d.Node |
cloneNode,
cloneTree,
cloneTree,
cloneTree,
getBounds,
getBoundsAutoCompute,
getCollidable,
getLocalToVworld,
getLocalToVworld,
getParent,
getPickable,
setBounds,
setBoundsAutoCompute,
setCollidable,
setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability,
duplicateSceneGraphObject,
getCapability,
getUserData,
isCompiled,
isLive,
setCapability,
setUserData |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Behavior()
Method Detail |
public abstract void initialize()
public abstract void processStimulus(java.util.Enumeration criteria)
criteria
- an enumeration of triggered wakeup criteria for this
behaviorpublic final void setSchedulingBounds(Bounds region)
region
- the bounds that contains the Behavior's new scheduling
region.public final Bounds getSchedulingBounds()
public final void setSchedulingBoundingLeaf(BoundingLeaf region)
region
- the bounding leaf node used to specify the Behavior
node's new scheduling region.public final BoundingLeaf getSchedulingBoundingLeaf()
protected void wakeupOn(WakeupCondition criteria)
criteria
- the wakeup criteria for this behaviorpublic void postId(int postId)
postId
- the Id being postedpublic void setEnable(boolean state)
state
- true or false to enable or disable this Behaviorpublic boolean getEnable()
protected View getView()
public void duplicateNode(Node originalNode, boolean forceDuplicate)
originalNode
into
the current node. This method is called from the
cloneNode
method which is, in turn, called by the
cloneTree
method.
For any NodeComponent objects
contained by the object being duplicated, each NodeComponent
object's duplicateOnCloneTree
value is used to determine
whether the NodeComponent should be duplicated in the new node
or if just a reference to the current node should be placed in the
new node. This flag can be overridden by setting the
forceDuplicate
parameter in the cloneTree
method to true
.
originalNode
- the original node to duplicate.forceDuplicate
- when set to true
, causes the
duplicateOnCloneTree
flag to be ignored. When
false
, the value of each node's
duplicateOnCloneTree
variable determines whether
NodeComponent data is duplicated or copied.Node.cloneTree()
,
Node.cloneNode(boolean)
,
NodeComponent.setDuplicateOnCloneTree(boolean)
public void updateNodeReferences(NodeReferenceTable referenceTable)
cloneTree
.
This method is called by cloneTree
after all nodes in
the sub-graph have been duplicated. The cloned Leaf node's method
will be called and the Leaf node can then look up any object references
by using the getNewObjectReference
method found in the
NodeReferenceTable
object. If a match is found, a
reference to the corresponding object in the newly cloned sub-graph
is returned. If no corresponding reference is found, either a
DanglingReferenceException is thrown or a reference to the original
object is returned depending on the value of the
allowDanglingReferences
parameter passed in the
cloneTree
call.referenceTable
- a NodeReferenceTableObject that contains the
getNewObjectReference
method needed to search for
new object instances.NodeReferenceTable
,
Node.cloneTree()
,
DanglingReferenceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |