|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.opengl.util.AnimatorBase
public abstract class AnimatorBase
Base implementation of GLAnimatorControl
The change synchronization is done via synchronized blocks on the AnimatorBase instance.
Status get / set activity is synced with a RecursiveLock, used as a memory barrier.
This is suitable, since all change requests are allowed to be expensive
as they are not expected to be called at every frame.
Nested Class Summary | |
---|---|
static interface |
AnimatorBase.AnimatorImpl
|
Field Summary |
---|
Fields inherited from interface javax.media.opengl.FPSCounter |
---|
DEFAULT_FRAMES_PER_INTERVAL |
Constructor Summary | |
---|---|
AnimatorBase()
Creates a new, empty Animator. |
Method Summary | |
---|---|
void |
add(GLAutoDrawable drawable)
|
long |
getFPSStartTime()
Returns the time of the first display call in milliseconds after enabling this feature via FPSCounter.setUpdateFPSFrames(int, PrintStream) .This value is reset via FPSCounter.resetFPSCounter() . |
float |
getLastFPS()
|
long |
getLastFPSPeriod()
|
long |
getLastFPSUpdateTime()
Returns the time of the last update interval in milliseconds, if this feature is enabled via FPSCounter.setUpdateFPSFrames(int, PrintStream) .This value is reset via FPSCounter.resetFPSCounter() . |
Thread |
getThread()
|
float |
getTotalFPS()
|
long |
getTotalFPSDuration()
|
int |
getTotalFPSFrames()
|
int |
getUpdateFPSFrames()
|
void |
remove(GLAutoDrawable drawable)
Removes a drawable from the animator's list of rendering drawables. This method should get called in case a drawable becomes invalid, and will not be recovered. This allows the animator thread to become idle in case the last drawable has reached it's end of life. |
void |
resetFPSCounter()
Reset all performance counter (startTime, currentTime, frame number) |
void |
setIgnoreExceptions(boolean ignoreExceptions)
Sets a flag causing this Animator to ignore exceptions produced while redrawing the drawables. |
void |
setPrintExceptions(boolean printExceptions)
Sets a flag indicating that when exceptions are being ignored by this Animator (see setIgnoreExceptions(boolean) ), to print the
exceptions' stack traces for diagnostic information. |
void |
setUpdateFPSFrames(int frames,
PrintStream out)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.media.opengl.GLAnimatorControl |
---|
isAnimating, isPaused, isStarted, pause, resume, start, stop |
Constructor Detail |
---|
public AnimatorBase()
Method Detail |
---|
public void add(GLAutoDrawable drawable)
public void remove(GLAutoDrawable drawable)
GLAnimatorControl
remove
in interface GLAnimatorControl
drawable
- the to be removed drawablepublic final void setUpdateFPSFrames(int frames, PrintStream out)
setUpdateFPSFrames
in interface FPSCounter
frames
- Update interval in frames.FPSCounter.DEFAULT_FRAMES_PER_INTERVAL
.out
- optional print stream where the fps values gets printed if not null at every frames intervalpublic final void resetFPSCounter()
FPSCounter
resetFPSCounter
in interface FPSCounter
public final int getUpdateFPSFrames()
getUpdateFPSFrames
in interface FPSCounter
FPSCounter.setUpdateFPSFrames(int, PrintStream)
public final long getFPSStartTime()
FPSCounter
FPSCounter.setUpdateFPSFrames(int, PrintStream)
.FPSCounter.resetFPSCounter()
.
getFPSStartTime
in interface FPSCounter
FPSCounter.setUpdateFPSFrames(int, PrintStream)
,
FPSCounter.resetFPSCounter()
public final long getLastFPSUpdateTime()
FPSCounter
FPSCounter.setUpdateFPSFrames(int, PrintStream)
.FPSCounter.resetFPSCounter()
.
getLastFPSUpdateTime
in interface FPSCounter
FPSCounter.setUpdateFPSFrames(int, PrintStream)
,
FPSCounter.resetFPSCounter()
public final long getLastFPSPeriod()
getLastFPSPeriod
in interface FPSCounter
FPSCounter.setUpdateFPSFrames(int, PrintStream)
,
FPSCounter.resetFPSCounter()
public final float getLastFPS()
getLastFPS
in interface FPSCounter
FPSCounter.getUpdateFPSFrames()
/ FPSCounter.getLastFPSPeriod()
FPSCounter.setUpdateFPSFrames(int, PrintStream)
,
FPSCounter.resetFPSCounter()
public final int getTotalFPSFrames()
getTotalFPSFrames
in interface FPSCounter
FPSCounter.getFPSStartTime()
up to FPSCounter.getLastFPSUpdateTime()
FPSCounter.setUpdateFPSFrames(int, PrintStream)
,
FPSCounter.resetFPSCounter()
public final long getTotalFPSDuration()
getTotalFPSDuration
in interface FPSCounter
FPSCounter.getLastFPSUpdateTime()
- FPSCounter.getFPSStartTime()
FPSCounter.setUpdateFPSFrames(int, PrintStream)
,
FPSCounter.resetFPSCounter()
public final float getTotalFPS()
getTotalFPS
in interface FPSCounter
FPSCounter.getTotalFPSFrames()
/ FPSCounter.getTotalFPSDuration()
FPSCounter.setUpdateFPSFrames(int, PrintStream)
,
FPSCounter.resetFPSCounter()
public final Thread getThread()
getThread
in interface GLAnimatorControl
GLAnimatorControl.start()
,
GLAnimatorControl.stop()
public void setIgnoreExceptions(boolean ignoreExceptions)
public void setPrintExceptions(boolean printExceptions)
setIgnoreExceptions(boolean)
), to print the
exceptions' stack traces for diagnostic information. Defaults to
false.
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |