public final class WakeupOnElapsedFrames extends WakeupCriterion
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.
Constructor and Description |
---|
WakeupOnElapsedFrames(int frameCount)
Constructs a non-passive WakeupOnElapsedFrames criterion.
|
WakeupOnElapsedFrames(int frameCount,
boolean passive)
Constructs a WakeupOnElapsedFrames criterion.
|
Modifier and Type | Method and Description |
---|---|
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.
|
hasTriggered
allElements, triggeredElements
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.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.IllegalArgumentException
- if frameCount is less than zeropublic int getElapsedFrameCount()
public boolean isPassive()
Copyright © 2016–2022 SciJava. All rights reserved.