|
OpenWalnut 1.3.1
|
Frame-based animation timing. More...
#include <WGEAnimationFrameTimer.h>
Inheritance diagram for WGEAnimationFrameTimer:Public Types | |
| typedef boost::shared_ptr < WGEAnimationFrameTimer > | SPtr |
| Convenience typedef for a shared_ptr. | |
| typedef boost::shared_ptr < const WGEAnimationFrameTimer > | ConstSPtr |
| Convenience typedef for a const shared_ptr. | |
Public Member Functions | |
| WGEAnimationFrameTimer (float framesPerSecond=24.0) | |
| Constructs a frame based animation timer. | |
| virtual | ~WGEAnimationFrameTimer () |
| Destructor. | |
| virtual void | reset () |
| Resets the start-tick. | |
| virtual double | elapsed () const |
| Returns the elapsed time since the last reset in seconds with milliseconds precision. | |
| virtual void | tick () |
| Increments frame count. | |
Private Attributes | |
| size_t | m_tick |
| The current tick value. | |
| double | m_framesPerSecond |
| The number of frames per second. | |
Frame-based animation timing.
Definition at line 37 of file WGEAnimationFrameTimer.h.
| typedef boost::shared_ptr< const WGEAnimationFrameTimer > WGEAnimationFrameTimer::ConstSPtr |
Convenience typedef for a const shared_ptr.
Reimplemented from WTimer.
Definition at line 48 of file WGEAnimationFrameTimer.h.
| typedef boost::shared_ptr< WGEAnimationFrameTimer > WGEAnimationFrameTimer::SPtr |
Convenience typedef for a shared_ptr.
Reimplemented from WTimer.
Definition at line 43 of file WGEAnimationFrameTimer.h.
| WGEAnimationFrameTimer::WGEAnimationFrameTimer | ( | float | framesPerSecond = 24.0 | ) | [explicit] |
Constructs a frame based animation timer.
The specified number of frames is used to convert the number of frames to a time.
| framesPerSecond | frames per second. |
Definition at line 27 of file WGEAnimationFrameTimer.cpp.
| WGEAnimationFrameTimer::~WGEAnimationFrameTimer | ( | ) | [virtual] |
Destructor.
Definition at line 35 of file WGEAnimationFrameTimer.cpp.
| double WGEAnimationFrameTimer::elapsed | ( | ) | const [virtual] |
Returns the elapsed time since the last reset in seconds with milliseconds precision.
Implements WTimer.
Definition at line 45 of file WGEAnimationFrameTimer.cpp.
References m_framesPerSecond, and m_tick.
| void WGEAnimationFrameTimer::reset | ( | ) | [virtual] |
Resets the start-tick.
Implements WTimer.
Definition at line 40 of file WGEAnimationFrameTimer.cpp.
References m_tick.
| void WGEAnimationFrameTimer::tick | ( | ) | [virtual] |
Increments frame count.
Definition at line 50 of file WGEAnimationFrameTimer.cpp.
References m_tick.
double WGEAnimationFrameTimer::m_framesPerSecond [private] |
The number of frames per second.
Definition at line 88 of file WGEAnimationFrameTimer.h.
Referenced by elapsed().
size_t WGEAnimationFrameTimer::m_tick [private] |
The current tick value.
Definition at line 83 of file WGEAnimationFrameTimer.h.
1.7.4