Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

RotationElements Class Reference

#include <rotation.h>

List of all members.

Public Member Functions

Quatd eclipticalToEquatorial (double t) const
Quatd eclipticalToPlanetographic (double t) const
Quatd equatorialToPlanetographic (double t) const
 RotationElements ()

Public Attributes

float ascendingNode
double epoch
float obliquity
float offset
float period
float precessionRate


Constructor & Destructor Documentation

RotationElements::RotationElements  )  [inline]
 

Definition at line 35 of file rotation.h.

00035                                    :
00036     period(1.0f),
00037     offset(0.0f),
00038     epoch(astro::J2000),
00039     obliquity(0.0f),
00040     ascendingNode(0.0f),
00041     precessionRate(0.0f)
00042 {
00043 }


Member Function Documentation

Quatd RotationElements::eclipticalToEquatorial double  t  )  const [inline]
 

Definition at line 57 of file rotation.h.

References ascendingNode, obliquity, and precessionRate.

Referenced by eclipticalToPlanetographic(), FrameOfReference::fromUniversal(), Renderer::renderStar(), and FrameOfReference::toUniversal().

00058 {
00059     double Omega = (double) ascendingNode + precessionRate * (t - astro::J2000);
00060 
00061     return (Quatd::xrotation(-obliquity) * Quatd::yrotation(-Omega));
00062 }

Quatd RotationElements::eclipticalToPlanetographic double  t  )  const [inline]
 

Definition at line 65 of file rotation.h.

References eclipticalToEquatorial(), and equatorialToPlanetographic().

Referenced by FrameOfReference::fromUniversal(), and FrameOfReference::toUniversal().

00066 {
00067     return equatorialToPlanetographic(t) * eclipticalToEquatorial(t);
00068 }

Quatd RotationElements::equatorialToPlanetographic double  t  )  const [inline]
 

Definition at line 71 of file rotation.h.

References epoch, offset, period, PI, and Quaternion< T >::yrotate().

Referenced by eclipticalToPlanetographic().

00072 {
00073     double rotations = (t - epoch) / (double) period;
00074     double wholeRotations = floor(rotations);
00075     double remainder = rotations - wholeRotations;
00076 
00077     // Add an extra half rotation because of the convention in all
00078     // planet texture maps where zero deg long. is in the middle of
00079     // the texture.
00080     remainder += 0.5;
00081     
00082     Quatd q(1);
00083     q.yrotate(-remainder * 2 * PI - offset);
00084 
00085     return q;
00086 }


Member Data Documentation

float RotationElements::ascendingNode
 

Definition at line 30 of file rotation.h.

Referenced by eclipticalToEquatorial(), Body::getEclipticalToEquatorial(), Body::getLocalToHeliocentric(), object_getinfo(), Renderer::renderOrbits(), and transformOrbits().

double RotationElements::epoch
 

Definition at line 28 of file rotation.h.

Referenced by createRotation(), equatorialToPlanetographic(), Body::getEquatorialToGeographic(), object_getinfo(), Renderer::renderPlanet(), and Renderer::renderStar().

float RotationElements::obliquity
 

Definition at line 29 of file rotation.h.

Referenced by createRotation(), eclipticalToEquatorial(), Body::getEclipticalToEquatorial(), Body::getLocalToHeliocentric(), object_getinfo(), Renderer::renderOrbits(), and transformOrbits().

float RotationElements::offset
 

Definition at line 27 of file rotation.h.

Referenced by createRotation(), equatorialToPlanetographic(), Body::getEquatorialToGeographic(), object_getinfo(), Renderer::renderPlanet(), and Renderer::renderStar().

float RotationElements::period
 

Definition at line 26 of file rotation.h.

Referenced by CreatePlanet(), createRotation(), StarDetails::CreateStandardStarType(), equatorialToPlanetographic(), Body::getEquatorialToGeographic(), SynchronousOrbit::getPeriod(), object_getinfo(), Renderer::renderPlanet(), and Renderer::renderStar().

float RotationElements::precessionRate
 

Definition at line 31 of file rotation.h.

Referenced by eclipticalToEquatorial(), Body::getEclipticalToEquatorial(), Body::getLocalToHeliocentric(), and object_getinfo().


The documentation for this class was generated from the following file:
Generated on Sat Jan 14 22:33:34 2006 for Celestia by  doxygen 1.4.1