Groups framerate and in-game time controls. Use this class for accurate movement according to framerate, as well as setting it to an unlimited, time-based framerate.
More...
#include <TimingSystem.hpp>
|
static void | init () |
| Initializes the timing system with no framerate cap. More...
|
|
static void | init (double DefaultFrameRate) |
| Initializes the timing system with a framerate cap. More...
|
|
static void | update () |
| Updates the timing sytem. More...
|
|
static double | GetDeltaTime () |
| Gets the delta time between this and the last frame. More...
|
|
static double | GetFPS () |
| Gets the framerate for the current frame. More...
|
|
static float | StepCorrection () |
| Calculates a correction factor for the speed of a step. More...
|
|
Groups framerate and in-game time controls. Use this class for accurate movement according to framerate, as well as setting it to an unlimited, time-based framerate.
◆ GetDeltaTime()
static double OficinaFramework::TimingSystem::GetDeltaTime |
( |
| ) |
|
|
static |
Gets the delta time between this and the last frame.
- Returns
- The delta time, in miliseconds, with double precision.
◆ GetFPS()
static double OficinaFramework::TimingSystem::GetFPS |
( |
| ) |
|
|
static |
Gets the framerate for the current frame.
- Returns
- The current framerate, with double precision.
◆ init() [1/2]
static void OficinaFramework::TimingSystem::init |
( |
| ) |
|
|
static |
Initializes the timing system with no framerate cap.
◆ init() [2/2]
static void OficinaFramework::TimingSystem::init |
( |
double |
DefaultFrameRate | ) |
|
|
static |
Initializes the timing system with a framerate cap.
- Parameters
-
DefaultFrameRate | The default frame rate to be used. |
◆ StepCorrection()
static float OficinaFramework::TimingSystem::StepCorrection |
( |
| ) |
|
|
static |
Calculates a correction factor for the speed of a step.
- Returns
- The step correction factor.
◆ update()
static void OficinaFramework::TimingSystem::update |
( |
| ) |
|
|
static |
Updates the timing sytem.
The documentation for this class was generated from the following file: