javax.media.j3d
Class WakeupOnElapsedFrames

java.lang.Object
  |
  +--javax.media.j3d.WakeupCondition
        |
        +--javax.media.j3d.WakeupCriterion
              |
              +--javax.media.j3d.WakeupOnElapsedFrames

public final class WakeupOnElapsedFrames
extends WakeupCriterion

Class specifying a wakeup when a specific number of frames have elapsed. The wakeup criterion can either be passive or non-passive. If a behavior uses a non-passive WakeupOnElapsedFrames, the rendering system will run continuously.


Constructor Summary
WakeupOnElapsedFrames(int frameCount)
          Constructs a non-passive WakeupOnElapsedFrames criterion.
WakeupOnElapsedFrames(int frameCount, boolean passive)
          Constructs a WakeupOnElapsedFrames criterion.
 
Method Summary
 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.
 
Methods inherited from class javax.media.j3d.WakeupCriterion
hasTriggered
 
Methods inherited from class javax.media.j3d.WakeupCondition
allElements, triggeredElements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WakeupOnElapsedFrames

public WakeupOnElapsedFrames(int frameCount)
Constructs a non-passive WakeupOnElapsedFrames criterion.
Parameters:
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.
Throws:
java.lang.IllegalArgumentException - if frameCount is less than zero

WakeupOnElapsedFrames

public WakeupOnElapsedFrames(int frameCount,
                             boolean passive)
Constructs a WakeupOnElapsedFrames criterion.
Parameters:
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.
Throws:
java.lang.IllegalArgumentException - if frameCount is less than zero
Since:
Java 3D 1.2
Method Detail

getElapsedFrameCount

public int getElapsedFrameCount()
Retrieves the elapsed frame count that was used when constructing this object.
Returns:
the elapsed frame count specified when constructing this object

isPassive

public boolean isPassive()
Retrieves the state of the passive flag that was used when constructing this object.
Returns:
true if this wakeup criterion is passive, false otherwise
Since:
Java 3D 1.2