Package javax.media.j3d
Class WakeupOnBehaviorPost
java.lang.Object
javax.media.j3d.WakeupCondition
javax.media.j3d.WakeupCriterion
javax.media.j3d.WakeupOnBehaviorPost
Class that specifies a Behavior wakeup when a specific behavior object
posts a specific event
-
Constructor Summary
ConstructorsConstructorDescriptionWakeupOnBehaviorPost
(Behavior behavior, int postId) Constructs a new WakeupOnBehaviorPost criterion. -
Method Summary
Modifier and TypeMethodDescriptionReturns the behavior specified in this object's constructor.int
Retrieve the WakeupCriterion's specified postIdReturns the behavior that triggered this wakeup.int
Returns the postId that caused the behavior to wakeup.Methods inherited from class javax.media.j3d.WakeupCriterion
hasTriggered
Methods inherited from class javax.media.j3d.WakeupCondition
allElements, triggeredElements
-
Constructor Details
-
WakeupOnBehaviorPost
Constructs a new WakeupOnBehaviorPost criterion. A behavior of null specifies a wakeup from any behavior on the specified postId. A postId of 0 specifies a wakeup on any postId from the specified behavior. A behavior of null AND a postId of 0 specify a wakeup on any postId from any behavior.- Parameters:
behavior
- the behavior that must be the source of the post, if behavior == null, then any behavior posting the postId will cause the wakeup.postId
- the postId that will trigger a wakeup if posted by the specified behavior, if postId == 0, then any post by the specified behavior will cause the wakeup.
-
-
Method Details
-
getPostId
public int getPostId()Retrieve the WakeupCriterion's specified postId- Returns:
- the post id specified in this object's construction.
-
getBehavior
Returns the behavior specified in this object's constructor.- Returns:
- the arming behavior
-
getTriggeringPostId
public int getTriggeringPostId()Returns the postId that caused the behavior to wakeup. If the postId used to construct this wakeup criterion was not zero, then the triggering postId will always be equal to the postId used in the constructor. -
getTriggeringBehavior
Returns the behavior that triggered this wakeup. If the arming behavior used to construct this object was not null, then the triggering behavior will be the same as the arming behavior.
-