jarp
Class FrameAnimationSynch

java.lang.Object
  extended by jarp.FrameAnimationSynch

public class FrameAnimationSynch
extends java.lang.Object

An instance of this class provides synchronisation for the playing of an animation consisting of a sequence of frames. The display of each animation frame is assumed to consist of a "generation" phase (in which the mesh data for the frame is computed), followed by a "display" phase (in which the computed data is passed to the GL display functions).


Constructor Summary
FrameAnimationSynch()
          Constructs a new frame animation synchronization object.
 
Method Summary
 boolean animationIsInProgress()
          Indicates whether or not an animation is in progress.
 boolean frameAnimationIsBusy()
          Indicates whether or not generation/display of a new animation frame is currently in progress.
 boolean frameGenerationIsBusy()
          Indicates whether or not the generation-phase for an animation frame is currently in progress.
 void setAnimationInProgress(boolean aip)
          Records whether or not an animation is in progress.
 void setFrameDisplayDone()
          If the generation-display sequence is currently in progress for a frame, then this marks its completion; otherwise, nothing at all is done.
 void setFrameGenerationDone()
          Marks the end of the generation phase for the current frame -- and thus the start of its display phase.
 void setFrameGenerationStarted()
          Records the start of the generation phase for a new frame.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrameAnimationSynch

public FrameAnimationSynch()
Constructs a new frame animation synchronization object.

Method Detail

setAnimationInProgress

public void setAnimationInProgress(boolean aip)
Records whether or not an animation is in progress.


animationIsInProgress

public boolean animationIsInProgress()
Indicates whether or not an animation is in progress.


setFrameGenerationStarted

public void setFrameGenerationStarted()
Records the start of the generation phase for a new frame.


setFrameGenerationDone

public void setFrameGenerationDone()
Marks the end of the generation phase for the current frame -- and thus the start of its display phase.


setFrameDisplayDone

public void setFrameDisplayDone()
If the generation-display sequence is currently in progress for a frame, then this marks its completion; otherwise, nothing at all is done.


frameAnimationIsBusy

public boolean frameAnimationIsBusy()
Indicates whether or not generation/display of a new animation frame is currently in progress.


frameGenerationIsBusy

public boolean frameGenerationIsBusy()
Indicates whether or not the generation-phase for an animation frame is currently in progress.