Planet.hpp   Planet.hpp 
skipping to change at line 76 skipping to change at line 76
double getSize(void) const {return radiusMax;} double getSize(void) const {return radiusMax;}
const float radiusMin; const float radiusMin;
const float radiusMax; const float radiusMax;
StelTextureSP tex; StelTextureSP tex;
}; };
class Planet : public StelObject class Planet : public StelObject
{ {
public: public:
friend class SolarSystem; friend class SolarSystem;
Q_ENUMS(PlanetType)
//! numeric typecodes for the type descriptions in ssystem.ini
// GZ: Until 0.13 QStrings were used for types.
// GZ: Enums are slightly faster than string comparisons in time-cri
tical comparisons.
// GZ: If other types are introduced, add here and the string in ini
t().
enum PlanetType
{
isStar, // ssystem.ini: type="star"
isPlanet, // ssystem.ini: type="planet"
isMoon, // ssystem.ini: type="moon"
isAsteroid, // ssystem.ini: type="asteroid"
isPlutoid, // ssystem.ini: type="plutoid"
isComet, // ssystem.ini: type="comet"
isUNDEFINED // ssystem.ini: type=<anything els
e>
};
Planet(const QString& englishName, Planet(const QString& englishName,
int flagLighting, int flagLighting,
double radius, double radius,
double oblateness, double oblateness,
Vec3f color, Vec3f color,
float albedo, float albedo,
const QString& texMapName, const QString& texMapName,
const QString& normalMapName, const QString& normalMapName,
posFuncType _coordFunc, posFuncType _coordFunc,
void* userDataPtr, void* userDataPtr,
OsculatingFunctType *osculatingFunc, OsculatingFunctType *osculatingFunc,
bool closeOrbit, bool closeOrbit,
bool hidden, bool hidden,
bool hasAtmosphere, bool hasAtmosphere,
bool hasHalo, bool hasHalo,
const QString &pType); const QString &pTypeStr);
virtual ~Planet(); virtual ~Planet();
//! Initializes static vars. Must be called before creating first pl
anet.
// Currently ensured by SolarSystem::init()
static void init();
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods inherited from StelObject // Methods inherited from StelObject
//! Get a string with data about the Planet. //! Get a string with data about the Planet.
//! Planets support the following InfoStringGroup flags: //! Planets support the following InfoStringGroup flags:
//! - Name //! - Name
//! - Magnitude //! - Magnitude
//! - RaDec //! - RaDec
//! - AltAzi //! - AltAzi
//! - Distance //! - Distance
//! - Size //! - Size
skipping to change at line 148 skipping to change at line 169
double getRadius(void) const {return radius;} double getRadius(void) const {return radius;}
//! Get duration of sidereal day //! Get duration of sidereal day
double getSiderealDay(void) const {return re.period;} double getSiderealDay(void) const {return re.period;}
//! Get duration of sidereal year //! Get duration of sidereal year
// GZ: made that virtual for Comets. // GZ: made that virtual for Comets.
virtual double getSiderealPeriod(void) const { return re.siderealPer iod; } virtual double getSiderealPeriod(void) const { return re.siderealPer iod; }
//! Get duration of mean solar day //! Get duration of mean solar day
double getMeanSolarDay(void) const; double getMeanSolarDay(void) const;
const QString& getTextMapName() const {return texMapName;} const QString& getTextMapName() const {return texMapName;}
const QString getPlanetTypeString() const {return pTypeMap.value(pTy
pe);}
PlanetType getPlanetType() const {return pType;}
// Compute the z rotation to use from equatorial to geographic coord inates // Compute the z rotation to use from equatorial to geographic coord inates
double getSiderealTime(double jd) const; double getSiderealTime(double jd) const;
Mat4d getRotEquatorialToVsop87(void) const; Mat4d getRotEquatorialToVsop87(void) const;
void setRotEquatorialToVsop87(const Mat4d &m); void setRotEquatorialToVsop87(const Mat4d &m);
const RotationElements &getRotationElements(void) const {return re;} const RotationElements &getRotationElements(void) const {return re;}
// Compute the position in the parent Planet coordinate system // Compute the position in the parent Planet coordinate system
void computePositionWithoutOrbits(const double date); void computePositionWithoutOrbits(const double dateJD);
void computePosition(const double date); virtual void computePosition(const double dateJD);// GZ: gets overri
dden in Comet!
// Compute the transformation matrix from the local Planet coordinat e to the parent Planet coordinate // Compute the transformation matrix from the local Planet coordinat e to the parent Planet coordinate
void computeTransMatrix(double date); void computeTransMatrix(double date);
// Get the phase angle (rad) for an observer at pos obsPos in helioc entric coordinates (in AU) // Get the phase angle (rad) for an observer at pos obsPos in helioc entric coordinates (in AU)
double getPhaseAngle(const Vec3d& obsPos) const; double getPhaseAngle(const Vec3d& obsPos) const;
// Get the elongation angle (rad) for an observer at pos obsPos in h eliocentric coordinates (in AU) // Get the elongation angle (rad) for an observer at pos obsPos in h eliocentric coordinates (in AU)
double getElongation(const Vec3d& obsPos) const; double getElongation(const Vec3d& obsPos) const;
// Get the angular size of the spheroid of the planet (i.e. without the rings) // Get the angular size of the spheroid of the planet (i.e. without the rings)
double getSpheroidAngularSize(const StelCore* core) const; double getSpheroidAngularSize(const StelCore* core) const;
skipping to change at line 293 skipping to change at line 316
OsculatingFunctType *const osculatingFunc; OsculatingFunctType *const osculatingFunc;
QSharedPointer<Planet> parent; // Planet parent i.e. sun f or earth QSharedPointer<Planet> parent; // Planet parent i.e. sun f or earth
QList<QSharedPointer<Planet> > satellites; // satellites of the Planet QList<QSharedPointer<Planet> > satellites; // satellites of the Planet
LinearFader hintFader; LinearFader hintFader;
LinearFader labelsFader; // Store the current state of the l abel for this planet LinearFader labelsFader; // Store the current state of the l abel for this planet
bool flagLabels; // Define whether labels should be displayed bool flagLabels; // Define whether labels should be displayed
bool hidden; // useful for fake planets used as observation positions - not drawn or labeled bool hidden; // useful for fake planets used as observation positions - not drawn or labeled
bool atmosphere; // Does the planet have an atmosphe re? bool atmosphere; // Does the planet have an atmosphe re?
bool halo; // Does the planet have a halo? bool halo; // Does the planet have a halo?
QString pType; // Type of body // QString pTypeStr; // Type of body, old versio
n just had a string here.
PlanetType pType; // GZ this is now a proper type...
static Vec3f labelColor; static Vec3f labelColor;
static StelTextureSP hintCircleTex; static StelTextureSP hintCircleTex;
static QMap<PlanetType, QString> pTypeMap; // GZ: maps fast type to english name.
// Shader-related variables // Shader-related variables
struct PlanetShaderVars { struct PlanetShaderVars {
int projectionMatrix; int projectionMatrix;
int texCoord; int texCoord;
int unprojectedVertex; int unprojectedVertex;
int vertex; int vertex;
int texture; int texture;
int lightDirection; int lightDirection;
int eyeDirection; int eyeDirection;
 End of changes. 8 change blocks. 
5 lines changed or deleted 37 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/