|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jogamp.opengl.util.AnimatorBase
com.jogamp.opengl.util.FPSAnimator
public class FPSAnimator
An Animator subclass which attempts to achieve a target frames-per-second rate to avoid using all CPU time. The target FPS is only an estimate and is not guaranteed.
The Animator execution thread does not run as a daemon thread,
so it is able to keep an application from terminating.
Call stop() to terminate the animation and it's execution thread.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.jogamp.opengl.util.AnimatorBase |
|---|
AnimatorBase.AnimatorImpl |
| Field Summary |
|---|
| Fields inherited from interface javax.media.opengl.FPSCounter |
|---|
DEFAULT_FRAMES_PER_INTERVAL |
| Constructor Summary | |
|---|---|
FPSAnimator(GLAutoDrawable drawable,
int fps)
Creates an FPSAnimator with a given target frames-per-second value and an initial drawable to animate. |
|
FPSAnimator(GLAutoDrawable drawable,
int fps,
boolean scheduleAtFixedRate)
Creates an FPSAnimator with a given target frames-per-second value, an initial drawable to animate, and a flag indicating whether to use fixed-rate scheduling. |
|
FPSAnimator(int fps)
Creates an FPSAnimator with a given target frames-per-second value. |
|
FPSAnimator(int fps,
boolean scheduleAtFixedRate)
Creates an FPSAnimator with a given target frames-per-second value and a flag indicating whether to use fixed-rate scheduling. |
|
| Method Summary | |
|---|---|
boolean |
isAnimating()
Indicates whether this animator is running and animating, the latter is true if it has GLAutoDrawables to render and is not paused. |
boolean |
isPaused()
Indicates whether this animator is running and paused. |
boolean |
isStarted()
Indicates whether this animator is running, ie. |
boolean |
pause()
Pauses this animator. |
boolean |
resume()
Resumes animation if paused. |
boolean |
start()
Starts this animator, if not running. |
boolean |
stop()
Stops this FPSAnimator. |
| Methods inherited from class com.jogamp.opengl.util.AnimatorBase |
|---|
add, getFPSStartTime, getLastFPS, getLastFPSPeriod, getLastFPSUpdateTime, getThread, getTotalFPS, getTotalFPSDuration, getTotalFPSFrames, getUpdateFPSFrames, remove, resetFPSCounter, setIgnoreExceptions, setPrintExceptions, setUpdateFPSFrames, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FPSAnimator(int fps)
FPSAnimator(null, fps).
public FPSAnimator(int fps,
boolean scheduleAtFixedRate)
FPSAnimator(null, fps,
scheduleAtFixedRate).
public FPSAnimator(GLAutoDrawable drawable,
int fps)
FPSAnimator(null, fps, false).
public FPSAnimator(GLAutoDrawable drawable,
int fps,
boolean scheduleAtFixedRate)
| Method Detail |
|---|
public final boolean isStarted()
GLAnimatorControl
GLAnimatorControl.start(),
GLAnimatorControl.stop(),
GLAnimatorControl.pause(),
GLAnimatorControl.resume()public final boolean isAnimating()
GLAnimatorControlGLAutoDrawables to render and is not paused.
GLAnimatorControl.start(),
GLAnimatorControl.stop(),
GLAnimatorControl.pause(),
GLAnimatorControl.resume()public final boolean isPaused()
GLAnimatorControl
GLAnimatorControl.start(),
GLAnimatorControl.stop(),
GLAnimatorControl.pause(),
GLAnimatorControl.resume()public boolean start()
GLAnimatorControlIn most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.
If started, all counters (time, frames, ..) are reset to zero.
GLAnimatorControl.stop(),
GLAnimatorControl.isAnimating(),
GLAnimatorControl.getThread()public boolean stop()
GLAnimatorControl.start(),
GLAnimatorControl.isAnimating(),
GLAnimatorControl.getThread()public boolean pause()
GLAnimatorControlIn most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.
GLAnimatorControl.resume(),
GLAnimatorControl.isAnimating()public boolean resume()
GLAnimatorControlIn most situations this method blocks until completion, except when called from the animation thread itself or in some cases from an implementation-internal thread like the AWT event queue thread.
If resumed, all counters (time, frames, ..) are reset to zero.
GLAnimatorControl.pause(),
GLAnimatorControl.isAnimating()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||