SolarSystem.hpp   SolarSystem.hpp 
skipping to change at line 26 skipping to change at line 26
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#ifndef _SOLARSYSTEM_HPP_ #ifndef _SOLARSYSTEM_HPP_
#define _SOLARSYSTEM_HPP_ #define _SOLARSYSTEM_HPP_
//sun is already defined in Sun C/Solaris //sun is already defined in Sun C/Solaris
#if defined(sun) #if defined(sun)
#undef sun #undef sun
#endif #endif
#include <vector>
#include <functional>
#include <QFont>
#include "StelObjectModule.hpp" #include "StelObjectModule.hpp"
#include "StelTextureTypes.hpp" #include "StelTextureTypes.hpp"
#include "Planet.hpp"
class Orbit; class Orbit;
class StelLoadingBar; class StelLoadingBar;
class StelTranslator; class StelTranslator;
class StelObject; class StelObject;
class Planet;
class StelFont;
class StelCore; class StelCore;
class StelProjector; class StelProjector;
class StelNavigator; class StelNavigator;
class QSettings; class QSettings;
typedef QSharedPointer<Planet> PlanetP;
//! @class SolarSystem //! @class SolarSystem
//! This StelObjectModule derivative is used to model SolarSystem boies. //! This StelObjectModule derivative is used to model SolarSystem boies.
//! This includes the Major Planets, Minor Planets and Comets. //! This includes the Major Planets, Minor Planets and Comets.
class SolarSystem : public StelObjectModule class SolarSystem : public StelObjectModule
{ {
Q_OBJECT Q_OBJECT
public: public:
SolarSystem(); SolarSystem();
virtual ~SolarSystem(); virtual ~SolarSystem();
skipping to change at line 192 skipping to change at line 192
void setMoonScale(float f); void setMoonScale(float f);
//! Get the display scaling factor for Earth's oon. //! Get the display scaling factor for Earth's oon.
float getMoonScale(void) const {return moonScale;} float getMoonScale(void) const {return moonScale;}
public: public:
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Other public methods // Other public methods
//! Get a pointer to a Planet object. //! Get a pointer to a Planet object.
//! @param planetEnglishName the English name of the desired planet. //! @param planetEnglishName the English name of the desired planet.
//! @return The matching planet pointer if exists or NULL. //! @return The matching planet pointer if exists or NULL.
Planet* searchByEnglishName(QString planetEnglishName) const; PlanetP searchByEnglishName(QString planetEnglishName) const;
//! Get the Planet object pointer for the Sun. //! Get the Planet object pointer for the Sun.
Planet* getSun(void) const {return sun;} PlanetP getSun(void) const {return sun;}
//! Get the Planet object pointer for the Earth. //! Get the Planet object pointer for the Earth.
Planet* getEarth(void) const {return earth;} PlanetP getEarth(void) const {return earth;}
//! Get the Planet object pointer for Earth's moon. //! Get the Planet object pointer for Earth's moon.
Planet* getMoon(void) const {return moon;} PlanetP getMoon(void) const {return moon;}
//! Determine if a lunar eclipse is close at hand? //! Determine if a lunar eclipse is close at hand?
bool nearLunarEclipse(); bool nearLunarEclipse();
//! Get the list of all the planet english names //! Get the list of all the planet english names
QStringList getAllPlanetEnglishNames() const; QStringList getAllPlanetEnglishNames() const;
//////////////////////////////////////////////////////////////////// /////////////////// //////////////////////////////////////////////////////////////////// ///////////////////
// DEPRECATED // DEPRECATED
//////////////////////////////////////////////////////////////////// /////////////////// //////////////////////////////////////////////////////////////////// ///////////////////
//! Get a hash of locale and ssystem.ini names for use with the TUI. //! Get a hash of locale and ssystem.ini names for use with the TUI.
//! @return A newline delimited hash of localized:standard planet na mes. //! @return A newline delimited hash of localized:standard planet na mes.
//! Planet translated name is PARENT : NAME //! Planet translated name is PARENT : NAME
QString getPlanetHashString(); QString getPlanetHashString();
//! Compute the position and transform matrix for every element of t he solar system. //! Compute the position and transform matrix for every element of t he solar system.
//! @param observerPos Position of the observer in heliocentric ecli ptic frame (Required for light travel time computation). //! @param observerPos Position of the observer in heliocentric ecli ptic frame (Required for light travel time computation).
//! @param date the date in JDay //! @param date the date in JDay
void computePositions(double date, const Vec3d& observerPos = Vec3d( 0,0,0)); void computePositions(double date, const Vec3d& observerPos = Vec3d( 0.));
//! Get the list of all the bodies of the solar system. //! Get the list of all the bodies of the solar system.
const std::vector<Planet*>& getAllPlanets() const {return systemPlan ets;} const QList<PlanetP>& getAllPlanets() const {return systemPlanets;}
private: private:
//! Search for SolarSystem objects which are close to the position g iven //! Search for SolarSystem objects which are close to the position g iven
//! in earth equatorial position. //! in earth equatorial position.
//! @param v A position in earth equatorial position. //! @param v A position in earth equatorial position.
//! @param core the StelCore object. //! @param core the StelCore object.
//! @return a pointer to a StelObject if found, else NULL //! @return a pointer to a StelObject if found, else NULL
StelObject* search(Vec3d v, const StelCore* core) const; StelObjectP search(Vec3d v, const StelCore* core) const;
//! Update the planet motion trails. //! Update the planet motion trails.
// void updateTrails(const StelNavigator* nav); // void updateTrails(const StelNavigator* nav);
//! Start/stop accumulating new trail data (clear old data). //! Start/stop accumulating new trail data (clear old data).
void startTrails(bool b); void startTrails(bool b);
//! Compute the transformation matrix for every elements of the sola r system. //! Compute the transformation matrix for every elements of the sola r system.
//! observerPos is needed for light travel time computation. //! observerPos is needed for light travel time computation.
void computeTransMatrices(double date, const Vec3d& observerPos = Ve c3d(0,0,0)); void computeTransMatrices(double date, const Vec3d& observerPos = Ve c3d(0.));
//! Draw a nice animated pointer around the object. //! Draw a nice animated pointer around the object.
void drawPointer(const StelCore* core); void drawPointer(const StelCore* core);
//! Load planet data from a file. //! Load planet data from a file.
void loadPlanets(); void loadPlanets();
Planet* sun; PlanetP sun;
Planet* moon; PlanetP moon;
Planet* earth; PlanetP earth;
//! Set selected planets by englishName. //! Set selected planets by englishName.
//! @param englishName The planet name or "" to select no planet //! @param englishName The planet name or "" to select no planet
void setSelected(const QString& englishName); void setSelected(const QString& englishName);
//! Set selected object from its pointer. //! Set selected object from its pointer.
void setSelected(StelObject* obj); void setSelected(PlanetP obj);
//! Get selected object's pointer. //! Get selected object's pointer.
StelObject* getSelected(void) const {return selected;} PlanetP getSelected(void) const {return selected;}
//! The currently selected planet. //! The currently selected planet.
StelObject* selected; PlanetP selected;
// Moon scale value
bool flagMoonScale; bool flagMoonScale;
float moonScale; // Moon scale value float moonScale;
double fontSize; QFont planetNameFont;
StelFont& planetNameFont;
//! The amount of planets labels (between 0 and 10) //! The amount of planets labels (between 0 and 10).
float labelsAmount; float labelsAmount;
std::vector<Planet*> systemPlanets; // Vector containing all the bo //! List of all the bodies of the solar system.
dies of the system QList<PlanetP> systemPlanets;
// And sort them from the furthest to the closest to the observer
struct biggerDistance : public std::binary_function<Planet*, Planet*
, bool>
{
bool operator()(Planet* p1, Planet* p2);
};
// Master settings // Master settings
bool flagOrbits; bool flagOrbits;
bool flagLightTravelTime; bool flagLightTravelTime;
StelTextureSP texPointer; // The selection pointer texture //! The selection pointer texture.
StelTextureSP texPointer;
bool flagShow; bool flagShow;
//////////////////////////////////////////////////////////////////// ////////////// //////////////////////////////////////////////////////////////////// //////////////
// DEPRECATED // DEPRECATED
//////////////////////////////////////////////////////////////////// ////////////// //////////////////////////////////////////////////////////////////// //////////////
const Planet* lastHomePlanet; // for tracking home planet changes PlanetP lastHomePlanet; // for tracking home planet changes for t
for trails rails
std::vector<Orbit*> orbits; // Pointers on created ellipti QList<Orbit*> orbits; // Pointers on created elliptical or
cal orbits bits
}; };
#endif // _SOLARSYSTEM_HPP_ #endif // _SOLARSYSTEM_HPP_
 End of changes. 24 change blocks. 
36 lines changed or deleted 30 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/