caelum::SolarSystemModel Class Reference

#include <SolarSystemModel.h>

List of all members.

Public Member Functions

 SolarSystemModel (Ogre::Degree longitude=Ogre::Degree(0), Ogre::Degree latitude=Ogre::Degree(45))
const Ogre::Degree getObserverLongitude () const
 Get the observer's longitude. East is positive, west is negative.
void setObserverLongitude (Ogre::Degree value)
 Set the observer's longitude. East is positive, west is negative.
const Ogre::Degree getObserverLatitude () const
 Get the observer's latitude. North is positive, south is negative.
void setObserverLatitude (Ogre::Degree value)
 Set the observer's latitude. North is positive, south is negative.
const Ogre::Vector3 getSunDirection (LongReal jday)
const Ogre::Vector3 getMoonDirection (LongReal jday)
const Ogre::Real getMoonPhase (LongReal jday)


Detailed Description

Class which calculates sun and moon positions on the sky. Most of the calculations are done in the astronomy class.

Definition at line 31 of file SolarSystemModel.h.


Constructor & Destructor Documentation

caelum::SolarSystemModel::SolarSystemModel ( Ogre::Degree  longitude = Ogre::Degree (0),
Ogre::Degree  latitude = Ogre::Degree (45) 
)

Constructor, initializes observer's position on earth.

Definition at line 33 of file SolarSystemModel.cpp.


Member Function Documentation

const Ogre::Vector3 caelum::SolarSystemModel::getSunDirection ( LongReal  jday  ) 

Get the sun's direction at a certain time.

Parameters:
jday astronomical julian day.
See also:
UniversalClock for julian day calculations.

Definition at line 49 of file SolarSystemModel.cpp.

References caelum::Astronomy::enterHighPrecissionFloatingPointMode(), caelum::Astronomy::getHorizontalSunPosition(), getObserverLatitude(), getObserverLongitude(), and caelum::Astronomy::restoreFloatingPointMode().

Referenced by caelum::CaelumSystem::updateSubcomponents().

const Ogre::Vector3 caelum::SolarSystemModel::getMoonDirection ( LongReal  jday  ) 

Get the moon's direction at a certain time.

Parameters:
jday astronomical julian day.

Definition at line 64 of file SolarSystemModel.cpp.

References caelum::Astronomy::enterHighPrecissionFloatingPointMode(), getObserverLatitude(), getObserverLongitude(), and caelum::Astronomy::restoreFloatingPointMode().

Referenced by caelum::CaelumSystem::updateSubcomponents().

const Ogre::Real caelum::SolarSystemModel::getMoonPhase ( LongReal  jday  ) 

Fake function to get the phase of the moon

Parameters:
jday Julian day
Returns:
the phase of the moon; ranging from 0(full moon) to 2(new moon). The calculations performed by this function are completely fake. It's a triangle wave with a period of 28.5 days.

Definition at line 78 of file SolarSystemModel.cpp.

Referenced by caelum::CaelumSystem::updateSubcomponents().


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

Generated on Fri Jul 11 09:24:53 2008 for Caelum by  doxygen 1.5.6