SolarSystem.hpp   SolarSystem.hpp 
skipping to change at line 30 skipping to change at line 30
#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 <QFont> #include <QFont>
#include "StelObjectModule.hpp" #include "StelObjectModule.hpp"
#include "StelTextureTypes.hpp"
#include "Planet.hpp" #include "Planet.hpp"
class Orbit; class Orbit;
class StelTranslator; class StelTranslator;
class StelObject; class StelObject;
class StelCore; class StelCore;
class StelProjector; class StelProjector;
class QSettings; class QSettings;
typedef QSharedPointer<Planet> PlanetP; typedef QSharedPointer<Planet> PlanetP;
skipping to change at line 63 skipping to change at line 62
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
//! Initialize the SolarSystem. //! Initialize the SolarSystem.
//! Includes: //! Includes:
//! - loading planetary body orbital and model data from data/ssyste m.ini //! - loading planetary body orbital and model data from data/ssyste m.ini
//! - perform initial planet position calculation //! - perform initial planet position calculation
//! - set display options from application settings //! - set display options from application settings
virtual void init(); virtual void init();
//! Draw SolarSystem objects (planets). //! Draw SolarSystem objects (planets).
//! @param core The StelCore object. //! @param core The StelCore object.
//! @param renderer Renderer to use for drawing.
//! @return The maximum squared distance in pixels that any SolarSys tem object //! @return The maximum squared distance in pixels that any SolarSys tem object
//! has travelled since the last update. //! has travelled since the last update.
virtual void draw(StelCore *core); virtual void draw(StelCore *core, class StelRenderer* renderer);
//! Update time-varying components. //! Update time-varying components.
//! This includes planet motion trails. //! This includes planet motion trails.
virtual void update(double deltaTime); virtual void update(double deltaTime);
//! Used to determine what order to draw the various StelModules. //! Used to determine what order to draw the various StelModules.
virtual double getCallOrder(StelModuleActionName actionName) const; virtual double getCallOrder(StelModuleActionName actionName) const;
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in StelObjectManager class // Methods defined in StelObjectManager class
skipping to change at line 104 skipping to change at line 104
//! @return a StelObjectP for the object if found, else NULL. //! @return a StelObjectP for the object if found, else NULL.
virtual StelObjectP searchByName(const QString& name) const; virtual StelObjectP searchByName(const QString& name) const;
//! Find objects by translated name prefix. //! Find objects by translated name prefix.
//! Find and return the list of at most maxNbItem objects auto-compl eting //! Find and return the list of at most maxNbItem objects auto-compl eting
//! the passed object I18n name. //! the passed object I18n name.
//! @param objPrefix the case insensitive first letters of the searc hed object. //! @param objPrefix the case insensitive first letters of the searc hed object.
//! @param maxNbItem the maximum number of returned object names. //! @param maxNbItem the maximum number of returned object names.
//! @return a list of matching object name by order of relevance, or an empty list if nothing matches. //! @return a list of matching object name by order of relevance, or an empty list if nothing matches.
virtual QStringList listMatchingObjectsI18n(const QString& objPrefix , int maxNbItem=5) const; virtual QStringList listMatchingObjectsI18n(const QString& objPrefix , int maxNbItem=5) const;
virtual QStringList listAllObjects(bool inEnglish) const;
virtual QString getName() const { return "Solar System"; }
public slots: public slots:
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Method callable from script and GUI // Method callable from script and GUI
// Properties setters and getters // Properties setters and getters
//! Set flag which determines if planets are drawn or hidden. //! Set flag which determines if planets are drawn or hidden.
void setFlagPlanets(bool b); void setFlagPlanets(bool b);
//! Get the current value of the flag which determines if planet are drawn or hidden. //! Get the current value of the flag which determines if planet are drawn or hidden.
bool getFlagPlanets() const; bool getFlagPlanets() const;
skipping to change at line 185 skipping to change at line 187
//! Translate names. (public so that SolarSystemEditor can call it). //! Translate names. (public so that SolarSystemEditor can call it).
void updateI18n(); void updateI18n();
//! Get the V magnitude for Solar system bodies from scripts //! Get the V magnitude for Solar system bodies from scripts
//! @param planetName the case in-sensistive English planet name. //! @param planetName the case in-sensistive English planet name.
//! @param withExtinction the flag for use extinction effect for mag nitudes (default not use) //! @param withExtinction the flag for use extinction effect for mag nitudes (default not use)
//! @return a magnitude //! @return a magnitude
float getPlanetVMagnitude(QString planetName, bool withExtinction=fa lse) const; float getPlanetVMagnitude(QString planetName, bool withExtinction=fa lse) const;
//! Get distance to Solar system bodies from scripts
//! @param planetName the case in-sensistive English planet name.
//! @return a distance (in AU)
double getDistanceToPlanet(QString planetName) const;
//! Get elongation for Solar system bodies from scripts
//! @param planetName the case in-sensistive English planet name.
//! @return a elongation (in radians)
double getElongationForPlanet(QString planetName) const;
//! Get phase angle for Solar system bodies from scripts
//! @param planetName the case in-sensistive English planet name.
//! @return a phase angle (in radians)
double getPhaseAngleForPlanet(QString planetName) const;
//! Get phase for Solar system bodies from scripts
//! @param planetName the case in-sensistive English planet name.
//! @return a phase
float getPhaseForPlanet(QString planetName) const;
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.
PlanetP 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.
PlanetP getSun() const {return sun;} PlanetP getSun() const {return sun;}
skipping to change at line 214 skipping to change at line 236
//! Get the list of all the planet english names //! Get the list of all the planet english names
QStringList getAllPlanetEnglishNames() const; QStringList getAllPlanetEnglishNames() const;
//! Get the list of all the planet localized names //! Get the list of all the planet localized names
QStringList getAllPlanetLocalizedNames() const; QStringList getAllPlanetLocalizedNames() const;
//! Reload the planets //! Reload the planets
void reloadPlanets(); void reloadPlanets();
//! Determines relative amount of sun visible from the observer's po
sition.
double getEclipseFactor(const StelCore *core) 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
//! \deprecated ??? //! \deprecated ???
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.
skipping to change at line 253 skipping to change at line 278
//! @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
StelObjectP search(Vec3d v, const StelCore* core) const; StelObjectP search(Vec3d v, const StelCore* core) const;
//! 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.)); 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); //!
//! @param core The StelCore object.
//! @param renderer Renderer to draw with.
void drawPointer(const StelCore* core, class StelRenderer* renderer)
;
//! Load planet data from the Solar System configuration file. //! Load planet data from the Solar System configuration file.
//! This function attempts to load every possible instance of the //! This function attempts to load every possible instance of the
//! Solar System configuration file in the file paths, falling back if a //! Solar System configuration file in the file paths, falling back if a
//! given path can't be loaded. //! given path can't be loaded.
void loadPlanets(); void loadPlanets();
//! Load planet data from the given file //! Load planet data from the given file
bool loadPlanets(const QString& filePath); bool loadPlanets(const QString& filePath);
void recreateTrails(); void recreateTrails();
//! Calculates the shadow information for the shadow planet shader.
class StelTextureNew* computeShadowInfo(StelRenderer* renderer);
//! Used by computeShadowInfo to generate shadow info texture before
uploading it.
QVector<Vec4f> shadowInfoBuffer;
//! Used by computeShadowInfo to store computed planet model matrice
s used to generate the
//! shadow info texture.
QVector<Mat4d> shadowModelMatricesBuffer;
//! Used to count how many planets actually need shadow information
int shadowPlanetCount;
PlanetP sun; PlanetP sun;
PlanetP moon; PlanetP moon;
PlanetP 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(PlanetP obj); void setSelected(PlanetP obj);
//! Get selected object's pointer. //! Get selected object's pointer.
skipping to change at line 297 skipping to change at line 338
float labelsAmount; float labelsAmount;
//! List of all the bodies of the solar system. //! List of all the bodies of the solar system.
QList<PlanetP> systemPlanets; QList<PlanetP> systemPlanets;
// Master settings // Master settings
bool flagOrbits; bool flagOrbits;
bool flagLightTravelTime; bool flagLightTravelTime;
//! The selection pointer texture. //! The selection pointer texture.
StelTextureSP texPointer; class StelTextureNew* texPointer;
bool flagShow; bool flagShow;
class TrailGroup* allTrails; class TrailGroup* allTrails;
LinearFader trailFader; LinearFader trailFader;
Vec3f trailColor; Vec3f trailColor;
Planet::SharedPlanetGraphics sharedPlanetGraphics;
//////////////////////////////////////////////////////////////////// ////////////// //////////////////////////////////////////////////////////////////// //////////////
// DEPRECATED // DEPRECATED
//////////////////////////////////////////////////////////////////// ////////////// //////////////////////////////////////////////////////////////////// //////////////
QList<Orbit*> orbits; // Pointers on created elliptical or bits QList<Orbit*> orbits; // Pointers on created elliptical or bits
}; };
#endif // _SOLARSYSTEM_HPP_ #endif // _SOLARSYSTEM_HPP_
 End of changes. 10 change blocks. 
5 lines changed or deleted 52 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/