VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends
makVrv::DtDeTimeManager Class Reference

The time manager is responsible for maintaining the currenting date and time of the scene. More...

Inheritance diagram for makVrv::DtDeTimeManager:
Inheritance graph
[legend]

Public Types

enum  Month {
  January = 1, February, March, April,
  May, June, July, August,
  September, October, November, December
}
 

Public Member Functions

virtual ~DtDeTimeManager ()
 DTOR. More...
 
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. More...
 
virtual void getReferenceDateAndTime (int &year, Month &month, int &dayOfMonth, int &hours, int &minutes, double &seconds) const
 Get the last set date. More...
 
virtual void syncReferenceDateAndTime ()
 Set the reference date and time to the current date and time. More...
 
virtual void setUseGlobalTimeZone (bool)
 When displaying the sun/moon position, use the observer (default, suppling false to this method) or use the current GMT time (supplying true to this method) More...
 
virtual bool useGlobalTimeZone () const
 Returns whether or not to use GMT Time for observer. More...
 
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. More...
 
virtual double timeScale () const
 Get the time scale. More...
 
virtual void setTimeScale (double timeScale)
 Set the time scale, this will also set the time base upon the current time scale. More...
 
virtual void getRecord (makArchives::DtDateTimeRecord &record) const
 Fill out a record with the current date/time and timescale. More...
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static bool isYearALeapYear (int year)
 Check to see if this is a leap year. More...
 
static int daysInTheMonthOf (int year, Month month)
 Get the number of days in a month. More...
 
static Month nextMonth (Month month)
 Get the next month. More...
 

Public Attributes

boost::signalslib::signal
< void(int year, Month month,
int day)> 
signal_dateChanged
 Signal when the date changes. More...
 
boost::signalslib::signal
< void(bool)> 
signal_useGlobalTimeZoneChanged
 Signal when using GMT time for observer changes. More...
 

Static Public Attributes

static const int theDefaultYear
 
static const Month theDefaultMonth
 
static const int theDefaultDayOfTheMonth
 
static const int theDefaultHours
 
static const int theDefaultMinutes
 
static const double theDefaultSeconds
 
static const double theDefaultTimeScaleFactor
 

Protected Member Functions

 DtDeTimeManager (DtDe &de)
 ! More...
 
double timeSinceSet () const
 

Protected Attributes

DtDemyDe
 
int myYear
 
Month myMonth
 
int myDayOfTheMonth
 
int myHours
 
int myMinutes
 
double mySeconds
 
double mySimulationTimeAtSet
 The simulation time when the time was set. More...
 
double myTimeScaleFactor
 The amount that time scale with simulation time. More...
 
bool myUseGlobalTimeZone
 Whether or not to use GMT time for sun/moon position (if true will) More...
 

Friends

class DtDeTimeManagerCreator
 

Detailed Description

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.

Member Enumeration Documentation

Enumerator
January 
February 
March 
April 
May 
June 
July 
August 
September 
October 
November 
December 

Constructor & Destructor Documentation

virtual makVrv::DtDeTimeManager::~DtDeTimeManager ( )
virtual

DTOR.

makVrv::DtDeTimeManager::DtDeTimeManager ( DtDe de)
protected

!

CTOR

Member Function Documentation

virtual void makVrv::DtDeTimeManager::setReferenceDateAndTime ( int  year,
Month  month,
int  dayOfMonth,
int  hours,
int  minutes,
double  seconds 
)
virtual

Set the reference date and time, used for calculating the current date and time.

Set the current date.

virtual void makVrv::DtDeTimeManager::getReferenceDateAndTime ( int year,
Month month,
int dayOfMonth,
int hours,
int minutes,
double seconds 
) const
virtual

Get the last set date.

virtual void makVrv::DtDeTimeManager::syncReferenceDateAndTime ( )
virtual

Set the reference date and time to the current date and time.

virtual void makVrv::DtDeTimeManager::setUseGlobalTimeZone ( bool  )
virtual

When displaying the sun/moon position, use the observer (default, suppling false to this method) or use the current GMT time (supplying true to this method)

virtual bool makVrv::DtDeTimeManager::useGlobalTimeZone ( ) const
virtual

Returns whether or not to use GMT Time for observer.

virtual void makVrv::DtDeTimeManager::calculateCurrentDateAndTime ( int year,
Month month,
int dayOfMonth,
int hour,
int minutes,
double seconds 
) const
virtual

Calculate the current date and time based upon the simulation time passes since the reference was set.

static bool makVrv::DtDeTimeManager::isYearALeapYear ( int  year)
static

Check to see if this is a leap year.

static int makVrv::DtDeTimeManager::daysInTheMonthOf ( int  year,
Month  month 
)
static

Get the number of days in a month.

The year is necessary for getting Leap days.

static Month makVrv::DtDeTimeManager::nextMonth ( Month  month)
static

Get the next month.

virtual double makVrv::DtDeTimeManager::timeScale ( ) const
virtual

Get the time scale.

virtual void makVrv::DtDeTimeManager::setTimeScale ( double  timeScale)
virtual

Set the time scale, this will also set the time base upon the current time scale.

Reimplemented in makVrf::DtVrfDeTimeManager.

virtual void makVrv::DtDeTimeManager::getRecord ( makArchives::DtDateTimeRecord record) const
virtual

Fill out a record with the current date/time and timescale.

double makVrv::DtDeTimeManager::timeSinceSet ( ) const
protected

Friends And Related Function Documentation

friend class DtDeTimeManagerCreator
friend

Member Data Documentation

const int makVrv::DtDeTimeManager::theDefaultYear
static
const Month makVrv::DtDeTimeManager::theDefaultMonth
static
const int makVrv::DtDeTimeManager::theDefaultDayOfTheMonth
static
const int makVrv::DtDeTimeManager::theDefaultHours
static
const int makVrv::DtDeTimeManager::theDefaultMinutes
static
const double makVrv::DtDeTimeManager::theDefaultSeconds
static
const double makVrv::DtDeTimeManager::theDefaultTimeScaleFactor
static
boost::signalslib::signal<void (int year, Month month, int day)> makVrv::DtDeTimeManager::signal_dateChanged

Signal when the date changes.

boost::signalslib::signal<void (bool)> makVrv::DtDeTimeManager::signal_useGlobalTimeZoneChanged

Signal when using GMT time for observer changes.

DtDe& makVrv::DtDeTimeManager::myDe
protected
int makVrv::DtDeTimeManager::myYear
protected
Month makVrv::DtDeTimeManager::myMonth
protected
int makVrv::DtDeTimeManager::myDayOfTheMonth
protected
int makVrv::DtDeTimeManager::myHours
protected
int makVrv::DtDeTimeManager::myMinutes
protected
double makVrv::DtDeTimeManager::mySeconds
protected
double makVrv::DtDeTimeManager::mySimulationTimeAtSet
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.

double makVrv::DtDeTimeManager::myTimeScaleFactor
protected

The amount that time scale with simulation time.

bool makVrv::DtDeTimeManager::myUseGlobalTimeZone
protected

Whether or not to use GMT time for sun/moon position (if true will)


The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)