Orbit.hpp   Orbit.hpp 
skipping to change at line 99 skipping to change at line 99
double parentRotJ2000Longitude double parentRotJ2000Longitude
); );
// Compute the orbit for a specified Julian day and return a "stella rium compliant" function // Compute the orbit for a specified Julian day and return a "stella rium compliant" function
// GZ: new optional variable: updateVelocityVector, true required fo r dust tail orientation! // GZ: new optional variable: updateVelocityVector, true required fo r dust tail orientation!
void positionAtTimevInVSOP87Coordinates(double JDE, double* v, bool updateVelocityVector=true); void positionAtTimevInVSOP87Coordinates(double JDE, double* v, bool updateVelocityVector=true);
// updating the tails is a bit expensive. try not to overdo it. // updating the tails is a bit expensive. try not to overdo it.
bool getUpdateTails() const { return updateTails; } bool getUpdateTails() const { return updateTails; }
void setUpdateTails(const bool update){ updateTails=update; } void setUpdateTails(const bool update){ updateTails=update; }
//! return speed value [AU/d] last computed by positionAtTimevInVSOP 87Coordinates(JDE, v, true) //! return speed value [AU/d] last computed by positionAtTimevInVSOP 87Coordinates(JDE, v, true)
Vec3d getVelocity() const { return rdot; } Vec3d getVelocity() const { return rdot; }
double getSemimajorAxis() const { return (e==1. ? 0. : q / (1.-e));
}
double getEccentricity() const { return e; }
bool objectDateValid(const double JDE) const { return (fabs(t0-JDE)< orbitGood); } bool objectDateValid(const double JDE) const { return (fabs(t0-JDE)< orbitGood); }
private: private:
const double q; //! perihel distance const double q; //! perihel distance
const double e; //! eccentricity const double e; //! eccentricity
const double i; //! inclination const double i; //! inclination
const double Om; //! longitude of ascending node const double Om; //! longitude of ascending node
const double w; //! argument of perihel const double w; //! argument of perihel
const double t0; //! time of perihel, JDE const double t0; //! time of perihel, JDE
const double n; //! mean motion (for parabolic orbits: W/dt in Heaf ner's presentation) const double n; //! mean motion (for parabolic orbits: W/dt in Heaf ner's presentation)
Vec3d rdot; //! GZ: velocity vector. Caches velocity from last position computation, [AU/d] Vec3d rdot; //! GZ: velocity vector. Caches velocity from last position computation, [AU/d]
double rotateToVsop87[9]; //! Rotation matrix double rotateToVsop87[9]; //! Rotation matrix
bool updateTails; //! flag to signal that tails must be recomputed. bool updateTails; //! flag to signal that tails must be recomputed.
const double orbitGood; //! orb. elements are only valid for this ti me [days]. Don't draw the object outside. const double orbitGood; //! orb. elements are only valid for this ti me from perihel [days]. Don't draw the object outside.
}; };
class OrbitSampleProc class OrbitSampleProc
{ {
public: public:
virtual ~OrbitSampleProc() {;} virtual ~OrbitSampleProc() {;}
virtual void sample(const Vec3d&) = 0; virtual void sample(const Vec3d&) = 0;
}; };
/*
* Stuff found unused and deactivated pre-0.15
// Custom orbit classes should be derived from CachingOrbit. The custom // Custom orbit classes should be derived from CachingOrbit. The custom
// orbits can be expensive to compute, with more than 50 periodic terms. // orbits can be expensive to compute, with more than 50 periodic terms.
// Celestia may need require position of a Planet more than once per frame; in // Celestia may need require position of a Planet more than once per frame; in
// order to avoid redundant calculation, the CachingOrbit class saves the // order to avoid redundant calculation, the CachingOrbit class saves the
// result of the last calculation and uses it if the time matches the cache d // result of the last calculation and uses it if the time matches the cache d
// time. // time.
class CachingOrbit : public Orbit class CachingOrbit : public Orbit
{ {
public: public:
CachingOrbit() : lastTime(1.0e-30) {} //; CachingOrbit() : lastTime(1.0e-30) {} //;
skipping to change at line 145 skipping to change at line 150
Vec3d positionAtTime(double JDE) const; Vec3d positionAtTime(double JDE) const;
virtual void sample(double, double, int, OrbitSampleProc& proc) cons t; virtual void sample(double, double, int, OrbitSampleProc& proc) cons t;
private: private:
mutable Vec3d lastPosition; mutable Vec3d lastPosition;
mutable double lastTime; mutable double lastTime;
}; };
*/
#endif // _ORBIT_HPP_ #endif // _ORBIT_HPP_
 End of changes. 4 change blocks. 
1 lines changed or deleted 9 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/