Cogs.Core
|
Provides time services for components depending on elapsed or system time for animation or other tracking. More...
#include <Time.h>
Public Member Functions | |
Time (class Context *context) | |
void | setAnimationTime (double value) |
Set the global animation time to the given value. | |
double | getAnimationTime () |
Gets the current animation time in seconds. | |
double | getAnimationTimeDelta () |
Get the time elapsed since the previous frame. | |
uint32_t | getFrame () |
Get the current frame number. | |
void | update () |
Updates the state of the time service. | |
Timer & | refDeltaTime () |
Return a non-const reference to the delta timer. | |
Private Attributes | |
Context * | context = nullptr |
double | animationTime = 0.0 |
double | animationTimeDelta = 0.0 |
uint32_t | frame = 0 |
Timer | timer |
Timer | timeDelta |
Provides time services for components depending on elapsed or system time for animation or other tracking.
double Cogs::Core::Time::getAnimationTime | ( | ) |
Gets the current animation time in seconds.
Definition at line 20 of file Time.cpp.
References getAnimationTime().
Referenced by getAnimationTime().
|
inline |
|
inline |
|
inline |
void Cogs::Core::Time::setAnimationTime | ( | double | value | ) |
Set the global animation time to the given value.
The time is given in seconds.
Definition at line 15 of file Time.cpp.
References setAnimationTime().
Referenced by setAnimationTime().
void Cogs::Core::Time::update | ( | ) |