#include <Timer.h>

Public Member Functions | |
| Timer () | |
| The standard constructor. | |
| Uint32 | getTime () |
| Returns the current time index. | |
| void | reset () |
| Resets the timer. | |
| void | reset (const Uint32 &time) |
| Resets the timer to a given value. | |
| void | processEvent (SDL_Event &event) |
| Method to handle events from SDL. | |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
Private Attributes | |
| Uint32 | lastSDLTicks |
| The last time index passed by SDL. | |
| Uint32 | lastTime |
| The last time that was given through getTime(). | |
| float | timeFlow |
| The current passage of time (1.0f is standard). | |
| bool | pause |
| Is the timer on pause. | |
| bool | bullettime |
| Is bullettime active? | |
| GLint | bullettimeFadeState |
| Is bullettime fading (0 = no, 1 = fadeIn, 2 = fadeOut). | |
| Uint32 | bullettimeProgress |
| Progression of the bullettime fade (in real time). | |
| Uint32 | bullettimeFadeTime |
| The time to fade to/from bullettime (in real time). | |
| GLfloat | bullettimeSpeed |
| The speed of bullettime. | |
This object is an interactive clock that may be stopped, accelarated or slowed down.
| Timer::Timer | ( | ) |
The standard constructor.
Simple initialization
| Uint32 Timer::getTime | ( | ) |
Returns the current time index.
| void Timer::reset | ( | ) |
Resets the timer.
Restarts the timer and sets it to 0
| void Timer::reset | ( | const Uint32 & | time | ) |
Resets the timer to a given value.
Restarts the timer at the given time
| time | The time index in ms from which to count up again |
| void Timer::processEvent | ( | SDL_Event & | event | ) | [virtual] |
Method to handle events from SDL.
| event | The SDL Event to be evaluated |
Implements EventListener.
| string Timer::toString | ( | ) | const [virtual] |
Returns a textual representation.
Implements EventListener.
| string Timer::className | ( | ) | const [virtual] |
Returns the class name of the object.
Implements EventListener.
| enum classId Timer::classId | ( | ) | const [virtual] |
Uint32 Timer::lastSDLTicks [private] |
The last time index passed by SDL.
Uint32 Timer::lastTime [private] |
float Timer::timeFlow [private] |
The current passage of time (1.0f is standard).
bool Timer::pause [private] |
Is the timer on pause.
bool Timer::bullettime [private] |
Is bullettime active?
GLint Timer::bullettimeFadeState [private] |
Is bullettime fading (0 = no, 1 = fadeIn, 2 = fadeOut).
Uint32 Timer::bullettimeProgress [private] |
Progression of the bullettime fade (in real time).
Uint32 Timer::bullettimeFadeTime [private] |
The time to fade to/from bullettime (in real time).
GLfloat Timer::bullettimeSpeed [private] |
The speed of bullettime.
1.5.6