21 #include "CaelumPrecompiled.h" 22 #include "UniversalClock.h" 23 #include "Astronomy.h" 35 mJulianDayBase = value;
41 int year,
int month,
int day,
42 int hour,
int minute,
double second)
68 return mCurrentTime - mLastUpdateTime;
80 mLastUpdateTime = mCurrentTime;
81 mCurrentTime += time * mTimeScale;
Dummy class to increase floting point precission in a block This class will raise precission in the c...
void update(const Ogre::Real time)
Updates the clock.
UniversalClock()
Constructor.
static const LongReal J2000
January 1, 2000, noon.
LongReal getJulianSecond() const
Get the current julian second (getJulianDay * SECONDS_PER_DAY) This is most likely very very large an...
static LongReal getJulianDayFromGregorianDateTime(int year, int month, int day, int hour, int minute, LongReal second)
Get astronomical julian day from normal gregorian calendar.
Ogre::Real getTimeScale() const
Gets the time scale.
LongReal getJulianSecondDifference() const
Get the difference in seconds between this and the last update.
LongReal getJulianDayDifference() const
Get the difference in julian day between this and the last update.
void setGregorianDateTime(int year, int month, int day, int hour, int minute, double second)
Set the current time as a gregorian date.
void setTimeScale(const Ogre::Real scale)
Sets the time scale.
void setJulianDay(LongReal value)
Set the current time as a julian day.
LongReal getJulianDay() const
Get current julian day.
static const LongReal SECONDS_PER_DAY
Number of seconds per day; exactly 60*60*24.