![]() |
scg3
0.6
|
Base class for all animations (abstract), providing general functionality. More...
#include "Animation.h"
Public Member Functions | |
Animation () | |
virtual | ~Animation () |
bool | isStarted () const |
bool | isRunning () const |
virtual void | start (double currTime) |
virtual void | stop () |
virtual void | reset () |
virtual void | update (double currTime)=0 |
Protected Attributes | |
bool | isStarted_ |
bool | isRunning_ |
double | lastTime_ |
double | diffTime_ |
double | totalTime_ |
Base class for all animations (abstract), providing general functionality.
Definition at line 34 of file Animation.h.
scg::Animation::Animation | ( | ) |
Constructor.
|
virtual |
Destructor.
bool scg::Animation::isRunning | ( | ) | const |
Check if animation is running.
bool scg::Animation::isStarted | ( | ) | const |
Check if animation has been started at least once.
|
virtual |
Reset animation, i.e., set all variables to their initial states.
Note: This method must also be called by derived methods.
|
virtual |
Start or restart animation with given time.
Note: This method must also be called by derived methods.
currTime | current time (seconds) |
Reimplemented in scg::TransformAnimation.
|
virtual |
Stop or pause animation.
Note: This method must also be called by derived methods.
|
pure virtual |
Update animation with given time.
Note: This method must also be called by derived methods.
currTime | current time (seconds) |
Implemented in scg::TransformAnimation.
|
protected |
time since last update (seconds)
Definition at line 95 of file Animation.h.
|
protected |
true if animation is running
Definition at line 93 of file Animation.h.
|
protected |
true if animation has been started (may be stopped temporarily)
Definition at line 92 of file Animation.h.
|
protected |
time of last update (seconds)
Definition at line 94 of file Animation.h.
|
protected |
time since last reset (seconds)
Definition at line 96 of file Animation.h.