25 #ifndef WGEANIMATIONFRAMETIMER_H
26 #define WGEANIMATIONFRAMETIMER_H
29 #include <boost/shared_ptr.hpp>
32 #include "../../common/WTimer.h"
45 typedef boost::shared_ptr< WGEAnimationFrameTimer >
SPtr;
50 typedef boost::shared_ptr< const WGEAnimationFrameTimer >
ConstSPtr;
93 #endif // WGEANIMATIONFRAMETIMER_H
virtual double elapsed() const
Returns the elapsed time since the last reset in seconds with milliseconds precision.
Frame-based animation timing.
double m_framesPerSecond
The number of frames per second.
boost::shared_ptr< WGEAnimationFrameTimer > SPtr
Convenience typedef for a shared_ptr.
virtual void reset()
Resets the start-tick.
WGEAnimationFrameTimer(float framesPerSecond=24.0)
Constructs a frame based animation timer.
boost::shared_ptr< const WGEAnimationFrameTimer > ConstSPtr
Convenience typedef for a const shared_ptr.
virtual ~WGEAnimationFrameTimer()
Destructor.
virtual void tick()
Increments frame count.
size_t m_tick
The current tick value.