#include <timeclock.h>
Timekeepings is surprisingly complex.
The computation of light from the sun or moon is also part of the time class.
Public Member Functions | |
| U32 | CurrentFrame () |
| The current frame. | |
| float | Fps () |
| Frames per second, based on a 1 second sample. | |
| float | FastFps () |
| Frames per second, on the last 300 ms sample. | |
| float | TotalFPS () |
| The frames per second since Lilith was started. | |
| float | CalcVelocity (float vel) |
| float | CalcChange (float value, float velocity, float minVal, float maxVal) |
| U32 | Msec () |
| Get the current millisec since the time clock started. | |
| float | HoursElapsed () |
| Get the gametime in floating point hours, instead of milliseconds. | |
| void | CalcCalendarTime (U32 *days, U32 *hours, U32 *minutes, U32 *seconds) |
| Get the gametime in clock units. | |
| void | ToggleSun () |
| Toggly mid-day on and off. | |
| float lilith3d::TimeClock::CalcVelocity | ( | float | vel | ) | [inline] |
The function used to calc any value that is a function of time. Converts speed (m/s) to distance traved in this tick (m).
| float lilith3d::TimeClock::CalcChange | ( | float | value, | |
| float | velocity, | |||
| float | minVal, | |||
| float | maxVal | |||
| ) | [inline] |
A subtle variant of CalcVelocity. Given a value, a velocity, and a range, change the value but keep it in range.
1.5.1-p1