Frames Per Second Class. More...
#include <FpsCounter.h>
Public Member Functions | |
| FpsCounter () | |
| Uint | getFps () |
Private Member Functions | |
| int | think () |
Private Attributes | |
| std::vector< Uint > | mFrameTimes |
| Uint | mFrameLastTick |
| Uint | mFrameCount |
Frames Per Second Class.
Convenient package to calculate a rough FPS value.
| FpsCounter::FpsCounter | ( | ) |
Basic Constructor
| Uint FpsCounter::getFps | ( | ) |
Returns an approximate FPS value.
| int FpsCounter::think | ( | ) | [inline, private] |
Calculate FPS.
Calculates an approximate FPS value and returns it as an integer.
Uint FpsCounter::mFrameCount [private] |
Frame Count.
Uint FpsCounter::mFrameLastTick [private] |
Difference between the current frame and the last frame.
std::vector<Uint> FpsCounter::mFrameTimes [private] |
An array to store frame times.
1.7.1