|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.WakeupCondition
javax.media.j3d.WakeupCriterion
javax.media.j3d.WakeupOnElapsedFrames
public final class WakeupOnElapsedFrames
Class specifying a wakeup when a specific number of frames have elapsed. The wakeup criterion can either be passive or non-passive. If any behavior uses a non-passive WakeupOnElapsedFrames, the rendering system will run continuously.
In general, applications cannot count on behavior execution being
synchronized with rendering. Behaviors that use
WakeupOnElapsedFrames with a frame count of 0 are an exception to
this general rule. Such behaviors will be executed every frame.
Further, all modifications to scene graph objects (not including
geometry by-reference or texture by-reference) made from the
processStimulus
methods of such behaviors are
guaranteed to take effect in the same rendering frame.
Field Summary | |
---|---|
(package private) static int |
COND_IN_BS_LIST
|
(package private) int |
countdown
|
(package private) int |
frameCount
|
(package private) boolean |
passive
|
(package private) static int |
TOTAL_INDEXED_UNORDER_SET_TYPES
|
Fields inherited from class javax.media.j3d.WakeupCriterion |
---|
triggered |
Fields inherited from class javax.media.j3d.WakeupCondition |
---|
ALL_ELEMENTS, allEnum, behav, conditionMet, id, listIdx, parent, trigEnum, TRIGGERED_ELEMENTS |
Constructor Summary | |
---|---|
WakeupOnElapsedFrames(int frameCount)
Constructs a non-passive WakeupOnElapsedFrames criterion. |
|
WakeupOnElapsedFrames(int frameCount,
boolean passive)
Constructs a WakeupOnElapsedFrames criterion. |
Method Summary | |
---|---|
(package private) void |
addBehaviorCondition(BehaviorStructure bs)
This is a callback from BehaviorStructure. |
int |
getElapsedFrameCount()
Retrieves the elapsed frame count that was used when constructing this object. |
boolean |
isPassive()
Retrieves the state of the passive flag that was used when constructing this object. |
(package private) void |
newFrame()
decrement the frame count, and set trigger if 0 |
(package private) void |
removeBehaviorCondition(BehaviorStructure bs)
This is a callback from BehaviorStructure. |
(package private) void |
resetBehaviorCondition(BehaviorStructure bs)
Perform task in addBehaviorCondition() that has to be set every time the condition met. |
Methods inherited from class javax.media.j3d.WakeupCriterion |
---|
buildTree, cleanTree, hasTriggered, resetTree, setTriggered |
Methods inherited from class javax.media.j3d.WakeupCondition |
---|
allElements, reInsertElapseTimeCond, setConditionMet, triggeredElements |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int COND_IN_BS_LIST
static final int TOTAL_INDEXED_UNORDER_SET_TYPES
boolean passive
int frameCount
int countdown
Constructor Detail |
---|
public WakeupOnElapsedFrames(int frameCount)
frameCount
- the number of frames that Java 3D should draw
before awakening this behavior object; a value of N means
wakeup at the end of frame N, where the current frame is zero,
a value of zero means wakeup at the end of the current frame.
java.lang.IllegalArgumentException
- if frameCount is less than zeropublic WakeupOnElapsedFrames(int frameCount, boolean passive)
frameCount
- the number of frames that Java 3D should draw
before awakening this behavior object; a value of N means
wakeup at the end of frame N, where the current frame is zero,
a value of zero means wakeup at the end of the current frame.passive
- flag indicating whether this behavior is
passive; a non-passive behavior will cause the rendering system
to run continuously, while a passive behavior will only run
when some other event causes a frame to be run.
java.lang.IllegalArgumentException
- if frameCount is less than zeroMethod Detail |
---|
public int getElapsedFrameCount()
public boolean isPassive()
void newFrame()
void addBehaviorCondition(BehaviorStructure bs)
addBehaviorCondition
in class WakeupCriterion
void removeBehaviorCondition(BehaviorStructure bs)
removeBehaviorCondition
in class WakeupCriterion
void resetBehaviorCondition(BehaviorStructure bs)
resetBehaviorCondition
in class WakeupCriterion
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |