public class TimingHandler extends Object
timerPool()
and an animatorPool()
. The timer
pool are all the tasks scheduled to be performed in the future (one single time or
periodically). The animation pool are all the objects that implement an animation
callback function. For an introduction to FPSTiming please refer to
this.Modifier and Type | Field and Description |
---|---|
float |
frameRate |
Constructor and Description |
---|
TimingHandler()
Main constructor.
|
TimingHandler(Animator aObject)
Constructor that takes and registers an animation object.
|
Modifier and Type | Method and Description |
---|---|
ArrayList<Animator> |
animatorPool()
Returns all the animated objects registered at the handler.
|
long |
frameCount()
Returns the number of frames displayed since the program started.
|
float |
frameRate()
Returns the approximate frame rate of the software as it executes.
|
void |
handle()
Handler's main method.
|
boolean |
isAnimatorRegistered(Animator object)
Returns
true if the animation object is registered and false
otherwise. |
boolean |
isTaskRegistered(TimingTask task)
Returns
true if the task is registered and false otherwise. |
void |
registerAnimator(Animator object)
Registers the animation object.
|
void |
registerTask(TimingTask task)
Register a task in the timer pool and creates a sequential timer for it.
|
void |
registerTask(TimingTask task,
Timer timer)
Register a task in the timer pool with the given timer.
|
void |
restoreTimers()
Converts all registered timers to single-threaded timers.
|
ArrayList<TimingTask> |
timerPool()
Returns the timer pool.
|
void |
unregisterAnimator(Animator object)
Unregisters the animation object.
|
void |
unregisterTask(SeqTimer t)
Unregisters the timer.
|
void |
unregisterTask(TimingTask task)
Unregisters the timer task.
|
public TimingHandler()
public TimingHandler(Animator aObject)
public void handle()
timerPool()
) callback functions; and, 3. Performs all the animated objects
(those in the animatorPool()
) animation functions.public ArrayList<TimingTask> timerPool()
public void registerTask(TimingTask task)
public void registerTask(TimingTask task, Timer timer)
public void unregisterTask(SeqTimer t)
unregisterTask(TimingTask)
public void unregisterTask(TimingTask task)
unregisterTask(SeqTimer)
public boolean isTaskRegistered(TimingTask task)
true
if the task is registered and false
otherwise.public float frameRate()
public long frameCount()
public void restoreTimers()
public ArrayList<Animator> animatorPool()
public void registerAnimator(Animator object)
public void unregisterAnimator(Animator object)
public boolean isAnimatorRegistered(Animator object)
true
if the animation object is registered and false
otherwise.Processing Library proscene by Jean Pierre Charalambos. (c) 2014-2017 National University of Colombia