Public Types | |
enum | Members { SUN_LIGHT_SOURCE = 0x01, SKY_DOME = 0x02, GROUND_PLANE = 0x04, MOON = 0x08, PLANETS = 0x10, STAR_FIELD = 0x20, ALL_MEMBERS, DEFAULT_MEMBERS } |
Public Member Functions | |
EphemerisModel () | |
EphemerisModel (const EphemerisModel ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
META_Node (osgEphemerisModel, EphemerisModel) | |
void | setEphemerisData (EphemerisData *data) |
EphemerisData * | getEphemerisData () |
void | setMembers (unsigned int bit_map_of_members) |
unsigned int | getMembers () const |
void | setAutoDateTime (bool flag) |
bool | getAutoDateTime () const |
void | setUseEphemerisEngine (bool flag) |
bool | getUseEphemerisEngine () const |
void | setSkyDomeRadius (double radius_in_meters) |
double | getSkyDomeRadius () const |
void | setSkyDomeCenter (osg::Vec3 center) |
osg::Vec3 | getSkyDomeCenter () |
void | setSunLightNum (unsigned int num) |
unsigned int | getSunLightNum () const |
void | setMoveWithEyePoint (bool flag) |
bool | getMoveWithEyePoint () const |
void | setLatitude (double latitude) |
double | getLatitude () const |
void | setLongitude (double longitude) |
double | getLongitude () const |
void | setLatitudeLongitude (double latitude, double longitude) |
void | getLatitudeLongitude (double &latitude, double &longitude) const |
void | setLatitudeLongitudeAltitude (double latitude, double longitude, double altitude) |
void | getLatitudeLongitudeAltitude (double &latitude, double &longitude, double &altitude) const |
void | setDateTime (const DateTime &dateTime) |
DateTime | getDateTime () const |
void | setEphemerisUpdateCallback (EphemerisUpdateCallback *updateCallback) |
const EphemerisUpdateCallback * | getEphemerisUpdateCallback () const |
void | update () |
virtual void | traverse (osg::NodeVisitor &nv) |
Classes | |
class | MoveWithEyePointTransform |
class | UpdateCallback |
EphemersModel is the programming interface to set the parameters for controlling the placement of heavenly bodies, namely the Sun, the Moon, Stars and Planets in the virtual scene.
EphemerisModel initializes a SkyDome which controls the sky color and provides a surface for projection of the texture of the Sun. It also retains a pointer to EphemerisData, which contains the actual parameters for computing the positions of the heavenly bodies, namely latitude, longitude, altitude, date and time.
EphemerisModel by default uses an EphemerisEngine to process the information about heavenly body position.
EphemerisModel also defines a light, for which it controls the position and colors, representing the light from the Sun.
EphermerisModel is intended to be a ground bound or near ground bound view presentation of heavenly bodies and not intended for space-based observation of heavenly bodies.
EphemerisModel derives from osg::Group and contains an internal traverse() method where it does internal updates at run-time.
|
The default constructor |
|
The copy contructor |
|
Return whether AutoDateTime is set. Returns True if set, False if not |
|
Get the current date and time setting in a DateTime struct |
|
Return a pointer to the current EphemerisUpdateCallback |
|
Get the current eyepoint latitude in degrees. |
|
Get both the latitude and longitude of the current eyepoint |
|
Get the latitude, longitude, and altitude of the current eyepoint |
|
Get the current eyepoint longitude in degrees. |
|
Returns as an integer the bitmask representing the set of members currently configured. |
|
Return whether MoveWithEyePoint is set. |
|
Returns an osg::Vec3 of the position of the center of the SkyDomeCenter. It should be noted that this is a static parameter that was set at initialization time and does not return the actual center of the skydome if setMoveWithEyePoint is set to true. |
|
Return the size in meters of the SkyDomeRadius |
|
Return which OpenGL light number is being used for the Sun light source. |
|
Return whether the use of the internal EphemerisEngine is set. |
|
Set whether the EphemerisModel should auto update its date and time using the computer's clock.
|
|
Set the current date and time by passing a DateTime struct |
|
This sets the source pointer to the Ephemeris data. By default, EphemerisModel will initialize the internal EphemerisData pointer by attaching to the shared memory mapped file defined by EphemerisData::getDefaultShmemFile(). This call may be made if the user intends to use a different EphemerisData source |
|
Set the Ephemeris Update Callback.
|
|
Set the current eyepoint latitude in degrees. |
|
Set both the latitude and longitude of the current eyepoint |
|
Set the latitude, longitude, and altitude of the current eyepoint |
|
Set the current eyepoint longitude in degrees. |
|
Control the members of the Ephemeris Model, which are, in their entirety, The sunlight source, a sky dome, a ground plane, the moon, the planets, the stars (in a star field). By default, the sunlight source, skydome, moon and starfield are included, excluding the ground plane and planets. The bitmap may be set by setting any of the bits defined in SUN_LIGHT_SOURCE SKY_DOME GROUND_PLANE MOON PLANTES STAR_FIELD ALL_MEMBERS combines SUN_LIGHT_SOURCE | SKY_DOME | GROUND_PLANE | MOON | PLANETS | STAR_FIELD. DEFAULT_MEMBERS combines SUN_LIGHT_SOURCE | SKY_DOME | MOON | STAR_FIELD. |
|
Set whether EphemerisModel should move the SkyDome and all components to be continually centered around the eyepoint. Default is True. |
|
Set the position of the center of the skydome in 3 space.
|
|
Set the size of the SkyDomeRadius.
|
|
Set which OpenGL light number should be used for the Sun light source. |
|
Set whether the EphemerisModel should use the internal EphemerisEngine.
|
|
Used internally |
|
Effect an update. Used internally by the internal UpdateCallback |