Oficina Framework  1.3
Games Framework
OficinaFramework::TimingSystem Class Reference

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>

Classes

class  TimeSpan
 Class designed to count a period of time. More...
 

Static Public Member Functions

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...
 

Detailed Description

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.

Member Function Documentation

◆ 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
DefaultFrameRateThe 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: