![]() |
VR-Forces 4.1.1 Class Documentation
|
The time manager is responsible for maintaining the currenting date and time of the scene. More...
Public Types | |
| enum | Month { January = 1, February, March, April, May, June, July, August, September, October, November, December } |
Public Member Functions | |
| DtDeTimeManager (DtDe &de) | |
| ! | |
| virtual | ~DtDeTimeManager () |
| DTOR. | |
| virtual void | setReferenceDateAndTime (int year, Month month, int dayOfMonth, int hours, int minutes, double seconds) |
| Set the reference date and time, used for calculating the current date and time. | |
| virtual void | getReferenceDateAndTime (int &year, Month &month, int &dayOfMonth, int &hours, int &minutes, double &seconds) const |
| Get the last set date. | |
| virtual void | syncReferenceDateAndTime () |
| Set the reference date and time to the current date and time. | |
| virtual void | calculateCurrentDateAndTime (int &year, Month &month, int &dayOfMonth, int &hour, int &minutes, double &seconds) const |
| Calculate the current date and time based upon the simulation time passes since the reference was set. | |
| virtual double | timeScale () const |
| Get the time scale. | |
| virtual void | setTimeScale (double timeScale) |
| Set the time scale, this will also set the time base upon the current time scale. | |
| virtual void | getRecord (makArchives::DtDateTimeRecord &record) const |
| Fill out a record with the current date/time and timescale. | |
Static Public Member Functions | |
| static bool | isYearALeapYear (int year) |
| Check to see if this is a leap year. | |
| static int | daysInTheMonthOf (int year, Month month) |
| Get the number of days in a month. | |
| static Month | nextMonth (Month month) |
| Get the next month. | |
Protected Member Functions | |
| double | timeSinceSet () const |
Protected Attributes | |
| DtDe & | myDe |
| int | myYear |
| Month | myMonth |
| int | myDayOfTheMonth |
| int | myHours |
| int | myMinutes |
| double | mySeconds |
| double | mySimulationTimeAtSet |
| The simulation time when the time was set. | |
| double | myTimeScaleFactor |
| The amount that time scale with simulation time. | |
The time manager is responsible for maintaining the currenting date and time of the scene.
It is also responsible for updating the time when the terrain changes, and querying the time of the observer.
| makVrv::DtDeTimeManager::DtDeTimeManager | ( | DtDe & | de | ) |
!
CTOR
|
virtual |
DTOR.
|
virtual |
Set the reference date and time, used for calculating the current date and time.
Set the current date.
|
virtual |
Get the last set date.
|
virtual |
Set the reference date and time to the current date and time.
|
virtual |
Calculate the current date and time based upon the simulation time passes since the reference was set.
|
static |
Check to see if this is a leap year.
|
static |
Get the number of days in a month.
The year is necessary for getting Leap days.
|
virtual |
Get the time scale.
|
virtual |
Set the time scale, this will also set the time base upon the current time scale.
|
virtual |
Fill out a record with the current date/time and timescale.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The simulation time when the time was set.
This is used along with the current simulation time to get the current time of day.
|
protected |
The amount that time scale with simulation time.