Stellarium 0.15.2
SolarSystem.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2002 Fabien Chereau
4  * Copyright (c) 2010 Bogdan Marinov
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
19  */
20 
21 #ifndef _SOLARSYSTEM_HPP_
22 #define _SOLARSYSTEM_HPP_
23 //sun is already defined in Sun C/Solaris
24 #if defined(sun)
25 #undef sun
26 #endif
27 
28 #include "StelObjectModule.hpp"
29 #include "StelTextureTypes.hpp"
30 #include "Planet.hpp"
31 #include "StelGui.hpp"
32 
33 #include <QFont>
34 
35 class Orbit;
36 class StelTranslator;
37 class StelObject;
38 class StelCore;
39 class StelProjector;
40 class QSettings;
41 
42 typedef QSharedPointer<Planet> PlanetP;
43 
48 {
49  Q_OBJECT
50  Q_PROPERTY(bool labelsDisplayed // This is a "forwarding property" which sets labeling into all planets.
51  READ getFlagLabels
52  WRITE setFlagLabels
53  NOTIFY labelsDisplayedChanged)
54  Q_PROPERTY(bool flagOrbits // was bool orbitsDisplayed
55  READ getFlagOrbits
56  WRITE setFlagOrbits
57  NOTIFY flagOrbitsChanged)
58  Q_PROPERTY(bool trailsDisplayed
59  READ getFlagTrails
60  WRITE setFlagTrails
61  NOTIFY trailsDisplayedChanged)
62  Q_PROPERTY(bool flagHints // was bool hintsDisplayed. This is a "forwarding property" only, without own variable.
63  READ getFlagHints
64  WRITE setFlagHints
65  NOTIFY flagHintsChanged)
66  Q_PROPERTY(bool flagPointer // was bool pointersDisplayed
67  READ getFlagPointer
68  WRITE setFlagPointer
69  NOTIFY flagPointerChanged)
70  Q_PROPERTY(bool flagNativePlanetNames // was bool nativeNamesDisplayed
73  NOTIFY flagNativePlanetNamesChanged)
74  Q_PROPERTY(bool flagTranslatedNames
77  NOTIFY flagTranslatedNamesChanged)
78 
79  //StelProperties
80  Q_PROPERTY(bool planetsDisplayed
81  READ getFlagPlanets
82  WRITE setFlagPlanets
83  NOTIFY flagPlanetsDisplayedChanged
84  )
85  Q_PROPERTY(bool flagIsolatedOrbits
88  NOTIFY flagIsolatedOrbitsChanged
89  )
90  Q_PROPERTY(bool flagIsolatedTrails
93  NOTIFY flagIsolatedTrailsChanged
94  )
95  Q_PROPERTY(bool flagLightTravelTime
98  NOTIFY flagLightTravelTimeChanged
99  )
100  Q_PROPERTY(bool flagMoonScale
101  READ getFlagMoonScale
102  WRITE setFlagMoonScale
103  NOTIFY flagMoonScaleChanged
104  )
105  Q_PROPERTY(double moonScale
106  READ getMoonScale
107  WRITE setMoonScale
108  NOTIFY moonScaleChanged
109  )
110  Q_PROPERTY(double labelsAmount
111  READ getLabelsAmount
112  WRITE setLabelsAmount
113  NOTIFY labelsAmountChanged
114  )
115  Q_PROPERTY(bool ephemerisMarkersDisplayed
116  READ getFlagEphemerisMarkers
117  WRITE setFlagEphemerisMarkers
118  NOTIFY ephemerisMarkersChanged
119  )
120  Q_PROPERTY(bool ephemerisDatesDisplayed
121  READ getFlagEphemerisDates
122  WRITE setFlagEphemerisDates
123  NOTIFY ephemerisDatesChanged
124  )
125 
126  Q_PROPERTY(bool flagCustomGrsSettings
129  NOTIFY flagCustomGrsSettingsChanged
130  )
131  Q_PROPERTY(int customGrsLongitude
134  NOTIFY customGrsLongitudeChanged
135  )
136  Q_PROPERTY(double customGrsDrift
137  READ getCustomGrsDrift
138  WRITE setCustomGrsDrift
139  NOTIFY customGrsDriftChanged
140  )
141  Q_PROPERTY(double customGrsJD
142  READ getCustomGrsJD
143  WRITE setCustomGrsJD
144  NOTIFY customGrsJDChanged
145  )
146 
147  // Colors
148  Q_PROPERTY(Vec3f orbitsColor
149  READ getOrbitsColor
150  WRITE setOrbitsColor
151  NOTIFY orbitsColorChanged
152  )
153  Q_PROPERTY(Vec3f majorPlanetsOrbitsColor
156  NOTIFY majorPlanetsOrbitsColorChanged
157  )
158  Q_PROPERTY(Vec3f minorPlanetsOrbitsColor
161  NOTIFY minorPlanetsOrbitsColorChanged
162  )
163  Q_PROPERTY(Vec3f dwarfPlanetsOrbitsColor
166  NOTIFY dwarfPlanetsOrbitsColorChanged
167  )
168  Q_PROPERTY(Vec3f moonsOrbitsColor
170  WRITE setMoonsOrbitsColor
171  NOTIFY moonsOrbitsColorChanged
172  )
173  Q_PROPERTY(Vec3f cubewanosOrbitsColor
176  NOTIFY cubewanosOrbitsColorChanged
177  )
178  Q_PROPERTY(Vec3f plutinosOrbitsColor
181  NOTIFY plutinosOrbitsColorChanged
182  )
183  Q_PROPERTY(Vec3f scatteredDiskObjectsOrbitsColor
186  NOTIFY scatteredDiskObjectsOrbitsColorChanged
187  )
188  Q_PROPERTY(Vec3f oortCloudObjectsOrbitsColor
191  NOTIFY oortCloudObjectsOrbitsColorChanged
192  )
193  Q_PROPERTY(Vec3f cometsOrbitsColor
196  NOTIFY cometsOrbitsColorChanged
197  )
198  Q_PROPERTY(Vec3f sednoidsOrbitsColor
201  NOTIFY sednoidsOrbitsColorChanged
202  )
203  Q_PROPERTY(Vec3f mercuryOrbitColor
206  NOTIFY mercuryOrbitColorChanged
207  )
208  Q_PROPERTY(Vec3f venusOrbitColor
209  READ getVenusOrbitColor
210  WRITE setVenusOrbitColor
211  NOTIFY venusOrbitColorChanged
212  )
213  Q_PROPERTY(Vec3f earthOrbitColor
214  READ getEarthOrbitColor
215  WRITE setEarthOrbitColor
216  NOTIFY earthOrbitColorChanged
217  )
218  Q_PROPERTY(Vec3f marsOrbitColor
219  READ getMarsOrbitColor
220  WRITE setMarsOrbitColor
221  NOTIFY marsOrbitColorChanged
222  )
223  Q_PROPERTY(Vec3f jupiterOrbitColor
226  NOTIFY jupiterOrbitColorChanged
227  )
228  Q_PROPERTY(Vec3f saturnOrbitColor
230  WRITE setSaturnOrbitColor
231  NOTIFY saturnOrbitColorChanged
232  )
233  Q_PROPERTY(Vec3f uranusOrbitColor
235  WRITE setUranusOrbitColor
236  NOTIFY uranusOrbitColorChanged
237  )
238  Q_PROPERTY(Vec3f neptuneOrbitColor
241  NOTIFY neptuneOrbitColorChanged
242  )
243 
244  // Color style
245  Q_PROPERTY(QString orbitColorStyle
246  READ getOrbitColorStyle
247  WRITE setOrbitColorStyle
248  NOTIFY orbitColorStyleChanged
249  )
250 
251 public:
252  SolarSystem();
253  virtual ~SolarSystem();
254 
256  // Methods defined in the StelModule class
262  virtual void init();
263 
264  virtual void deinit();
265 
270  virtual void draw(StelCore *core);
271 
274  virtual void update(double deltaTime);
275 
277  virtual double getCallOrder(StelModuleActionName actionName) const;
278 
280  // Methods defined in StelObjectManager class
289  virtual QList<StelObjectP> searchAround(const Vec3d& v, double limitFov, const StelCore* core) const;
290 
294  virtual StelObjectP searchByNameI18n(const QString& nameI18n) const;
295 
299  virtual StelObjectP searchByName(const QString& name) const;
300 
301  virtual QStringList listAllObjects(bool inEnglish) const;
302  virtual QStringList listAllObjectsByType(const QString& objType, bool inEnglish) const;
303  virtual QString getName() const { return "Solar System"; }
304 
305 public slots:
307  // Method callable from script and GUI
308  // Properties setters and getters
310  void setFlagPlanets(bool b);
312  bool getFlagPlanets() const;
313 
315  void setFlagTrails(bool b);
317  bool getFlagTrails() const;
318 
320  void setFlagHints(bool b);
322  bool getFlagHints() const;
323 
325  void setFlagLabels(bool b);
327  bool getFlagLabels() const;
328 
332  void setLabelsAmount(double a) {if(a!=labelsAmount) {labelsAmount=a; emit labelsAmountChanged(a);}}
335  double getLabelsAmount(void) const {return labelsAmount;}
336 
338  void setFlagOrbits(bool b);
340  bool getFlagOrbits() const {return flagOrbits;}
341 
343  void setFlagPointer(bool b) { if (b!=flagPointer) { flagPointer=b; emit flagPointerChanged(b); }}
345  bool getFlagPointer() const { return flagPointer;}
346 
348  void setFlagLightTravelTime(bool b);
351  bool getFlagLightTravelTime(void) const {return flagLightTravelTime;}
352 
355  void setFontSize(float newFontSize);
356 
363  void setLabelsColor(const Vec3f& c);
366  const Vec3f& getLabelsColor(void) const;
367 
374  void setOrbitsColor(const Vec3f& c);
377  Vec3f getOrbitsColor(void) const;
378 
385  void setMajorPlanetsOrbitsColor(const Vec3f& c);
388  Vec3f getMajorPlanetsOrbitsColor(void) const;
389 
396  void setMoonsOrbitsColor(const Vec3f& c);
399  Vec3f getMoonsOrbitsColor(void) const;
400 
407  void setMinorPlanetsOrbitsColor(const Vec3f& c);
410  Vec3f getMinorPlanetsOrbitsColor(void) const;
411 
418  void setDwarfPlanetsOrbitsColor(const Vec3f& c);
421  Vec3f getDwarfPlanetsOrbitsColor(void) const;
422 
429  void setCubewanosOrbitsColor(const Vec3f& c);
432  Vec3f getCubewanosOrbitsColor(void) const;
433 
440  void setPlutinosOrbitsColor(const Vec3f& c);
443  Vec3f getPlutinosOrbitsColor(void) const;
444 
455 
462  void setOortCloudObjectsOrbitsColor(const Vec3f& c);
466 
473  void setCometsOrbitsColor(const Vec3f& c);
476  Vec3f getCometsOrbitsColor(void) const;
477 
484  void setSednoidsOrbitsColor(const Vec3f& c);
487  Vec3f getSednoidsOrbitsColor(void) const;
488 
495  void setMercuryOrbitColor(const Vec3f& c);
498  Vec3f getMercuryOrbitColor(void) const;
499 
506  void setVenusOrbitColor(const Vec3f& c);
509  Vec3f getVenusOrbitColor(void) const;
510 
517  void setEarthOrbitColor(const Vec3f& c);
520  Vec3f getEarthOrbitColor(void) const;
521 
528  void setMarsOrbitColor(const Vec3f& c);
531  Vec3f getMarsOrbitColor(void) const;
532 
539  void setJupiterOrbitColor(const Vec3f& c);
542  Vec3f getJupiterOrbitColor(void) const;
543 
550  void setSaturnOrbitColor(const Vec3f& c);
553  Vec3f getSaturnOrbitColor(void) const;
554 
561  void setUranusOrbitColor(const Vec3f& c);
564  Vec3f getUranusOrbitColor(void) const;
565 
572  void setNeptuneOrbitColor(const Vec3f& c);
575  Vec3f getNeptuneOrbitColor(void) const;
576 
583  void setTrailsColor(const Vec3f& c) {trailColor=c;}
586  Vec3f getTrailsColor() const {return trailColor;}
587 
594  void setPointerColor(const Vec3f& c) {pointerColor=c;}
597  Vec3f getPointerColor() const {return pointerColor;}
598 
600  void setFlagMoonScale(bool b);
602  bool getFlagMoonScale(void) const {return flagMoonScale;}
603 
605  void setMoonScale(double f);
607  double getMoonScale(void) const {return moonScale;}
608 
610  void updateI18n();
611 
616  float getPlanetVMagnitude(QString planetName, bool withExtinction=false) const;
617 
621  QString getPlanetType(QString planetName) const;
622 
626  double getDistanceToPlanet(QString planetName) const;
627 
631  double getElongationForPlanet(QString planetName) const;
632 
636  double getPhaseAngleForPlanet(QString planetName) const;
637 
641  float getPhaseForPlanet(QString planetName) const;
642 
656  void setApparentMagnitudeAlgorithmOnEarth(QString algorithm);
657 
660  QString getApparentMagnitudeAlgorithmOnEarth() const;
661 
663  void setFlagNativePlanetNames(bool b);
665  bool getFlagNativePlanetNames(void) const;
666 
668  void setFlagTranslatedNames(bool b);
670  bool getFlagTranslatedNames(void) const;
671 
673  void setFlagIsolatedTrails(bool b);
675  bool getFlagIsolatedTrails(void) const;
676 
678  void setFlagIsolatedOrbits(bool b);
680  bool getFlagIsolatedOrbits(void) const;
681 
683  void setFlagCustomGrsSettings(bool b);
686 
689  void setCustomGrsLongitude(int longitude);
692  int getCustomGrsLongitude();
693 
696  void setCustomGrsDrift(double drift);
698  double getCustomGrsDrift();
699 
702  // TODO (GZ): Clarify whether this is JD or rather JDE?
703  void setCustomGrsJD(double JD);
705  double getCustomGrsJD();
706 
708  void setOrbitColorStyle(QString style);
710  QString getOrbitColorStyle() const;
711 
714  QStringList getObjectsList(QString objType="all") const;
715 
716 signals:
717  void labelsDisplayedChanged(bool b);
718  void flagOrbitsChanged(bool b);
719  void flagHintsChanged(bool b);
720  void trailsDisplayedChanged(bool b);
721  void flagPointerChanged(bool b);
722  void flagNativePlanetNamesChanged(bool b);
723  void flagTranslatedNamesChanged(bool b);
724  void flagPlanetsDisplayedChanged(bool b);
725  void flagIsolatedOrbitsChanged(bool b);
726  void flagIsolatedTrailsChanged(bool b);
727  void flagLightTravelTimeChanged(bool b);
728  void flagMoonScaleChanged(bool b);
729  void moonScaleChanged(double f);
730  void labelsAmountChanged(double f);
731  void ephemerisMarkersChanged(bool b);
732  void ephemerisDatesChanged(bool b);
733  void flagCustomGrsSettingsChanged(bool b);
734  void customGrsLongitudeChanged(int l);
735  void customGrsDriftChanged(double drift);
736  void customGrsJDChanged(double JD);
737 
738  void orbitsColorChanged(const Vec3f & color) const;
739  void majorPlanetsOrbitsColorChanged(const Vec3f & color) const;
740  void minorPlanetsOrbitsColorChanged(const Vec3f & color) const;
741  void dwarfPlanetsOrbitsColorChanged(const Vec3f & color) const;
742  void moonsOrbitsColorChanged(const Vec3f & color) const;
743  void cubewanosOrbitsColorChanged(const Vec3f & color) const;
744  void plutinosOrbitsColorChanged(const Vec3f & color) const;
745  void scatteredDiskObjectsOrbitsColorChanged(const Vec3f & color) const;
746  void oortCloudObjectsOrbitsColorChanged(const Vec3f & color) const;
747  void cometsOrbitsColorChanged(const Vec3f & color) const;
748  void sednoidsOrbitsColorChanged(const Vec3f & color) const;
749  void mercuryOrbitColorChanged(const Vec3f & color) const;
750  void venusOrbitColorChanged(const Vec3f & color) const;
751  void earthOrbitColorChanged(const Vec3f & color) const;
752  void marsOrbitColorChanged(const Vec3f & color) const;
753  void jupiterOrbitColorChanged(const Vec3f & color) const;
754  void saturnOrbitColorChanged(const Vec3f & color) const;
755  void uranusOrbitColorChanged(const Vec3f & color) const;
756  void neptuneOrbitColorChanged(const Vec3f & color) const;
757 
758  void orbitColorStyleChanged(QString style) const;
759 
760  void solarSystemDataReloaded();
761 
762 public:
764  // Other public methods
768  PlanetP searchByEnglishName(QString planetEnglishName) const;
769 
771  PlanetP getSun() const {return sun;}
772 
774  PlanetP getEarth() const {return earth;}
775 
777  PlanetP getMoon() const {return moon;}
778 
780  bool nearLunarEclipse();
781 
783  QStringList getAllPlanetEnglishNames() const;
784 
786  QStringList getAllPlanetLocalizedNames() const;
787 
789  void reloadPlanets();
790 
792  double getEclipseFactor(const StelCore *core) const;
793 
797  void computePositions(double dateJDE, const Vec3d& observerPos = Vec3d(0.));
798 
800  const QList<PlanetP>& getAllPlanets() const {return systemPlanets;}
801 
802 private slots:
804  void selectedObjectChange(StelModule::StelModuleSelectAction action);
805 
809  void updateSkyCulture(const QString& skyCultureDir);
810 
811  void setFlagEphemerisMarkers(bool b);
812  bool getFlagEphemerisMarkers() const;
813 
814  void setFlagEphemerisDates(bool b);
815  bool getFlagEphemerisDates() const;
816 
817 private:
823  StelObjectP search(Vec3d v, const StelCore* core) const;
824 
827  void computeTransMatrices(double dateJDE, const Vec3d& observerPos = Vec3d(0.));
828 
830  void drawPointer(const StelCore* core);
831 
836  void loadPlanets();
837 
839  bool loadPlanets(const QString& filePath);
840 
841  void recreateTrails();
842 
844  void setFlagPermanentOrbits(bool b);
845 
847  int shadowPlanetCount;
848  PlanetP sun;
849  PlanetP moon;
850  PlanetP earth;
851 
854  void setSelected(const QString& englishName);
856  void setSelected(PlanetP obj);
858  PlanetP getSelected(void) const {return selected;}
860  PlanetP selected;
861 
862  // Moon scale value
863  bool flagMoonScale;
864  double moonScale;
865 
866  QFont planetNameFont;
867 
869  double labelsAmount;
870 
872  QList<PlanetP> systemPlanets;
873 
874  // Master settings
875  bool flagOrbits;
876  bool flagLightTravelTime;
877 
879  StelTextureSP texPointer;
880  StelTextureSP texCircle; // The symbolic circle texture
881 
882  bool flagShow;
883  bool flagPointer; // show red cross selection pointer?
884  bool flagNativePlanetNames; // show native names for planets?
885  bool flagTranslatedNames; // show translated names?
886  bool flagIsolatedTrails;
887  bool flagIsolatedOrbits;
888  bool ephemerisMarkersDisplayed;
889  bool ephemerisDatesDisplayed;
890 
891  class TrailGroup* allTrails;
892  StelGui* gui;
893  QSettings* conf;
894  LinearFader trailFader;
895  Vec3f trailColor;
896  Vec3f pointerColor;
897 
898  QHash<QString, QString> planetNativeNamesMap;
899 
900  QList<Orbit*> orbits; // Pointers on created elliptical orbits
901 };
902 
903 
904 #endif // _SOLARSYSTEM_HPP_
double getElongationForPlanet(QString planetName) const
Get elongation for Solar system bodies from scripts.
void setPointerColor(const Vec3f &c)
Set the color used to draw planet pointers.
float getPhaseForPlanet(QString planetName) const
Get phase for Solar system bodies from scripts.
bool getFlagTranslatedNames(void) const
Get the current value of the flag which enables showing translated names for planets or not...
Definition: Orbit.hpp:22
virtual void update(double deltaTime)
Update time-varying components.
QStringList getAllPlanetEnglishNames() const
Get the list of all the planet english names.
void setFlagOrbits(bool b)
Set flag which determines if planet orbits are drawn or hidden.
bool getFlagMoonScale(void) const
Get the current value of the flag which determines if Earth&#39;s moon is scaled or not.
Vec3f getDwarfPlanetsOrbitsColor(void) const
Get the current color used to draw orbits lines of the dwarf planets.
QString getApparentMagnitudeAlgorithmOnEarth() const
Get the algorithm used for computation of apparent magnitudes for planets in case observer on the Ear...
virtual double getCallOrder(StelModuleActionName actionName) const
Used to determine what order to draw the various StelModules.
void setFlagMoonScale(bool b)
Set flag which determines if Earth&#39;s moon is scaled or not.
Vec3f getPointerColor() const
Get the current color used to draw planet pointers.
void setFlagIsolatedOrbits(bool b)
Set flag which enabled the showing of isolated orbits for selected objects only or not...
PlanetP getSun() const
Get the Planet object pointer for the Sun.
PlanetP getEarth() const
Get the Planet object pointer for the Earth.
Class used to translate strings to any language.
Implementation of StelFader which implements a linear transition.
Definition: StelFader.hpp:77
double getCustomGrsDrift()
Get speed of annual drift for Great Red Spot (System II is used)
double getLabelsAmount(void) const
Get the amount of planet labels.
The base abstract class for sky objects used in Stellarium like Stars, Planets, Constellations etc...
Definition: StelObject.hpp:36
Vec3f getPlutinosOrbitsColor(void) const
Get the current color used to draw orbits lines of plutinos.
void reloadPlanets()
Reload the planets.
Define the StelTextureSP type.
Vec3f getNeptuneOrbitColor(void) const
Get the current color used to draw Neptune orbit line.
bool getFlagCustomGrsSettings()
Get the current value of the flag which determines if custom settings for Great Red Spot on Jupiter i...
void setMinorPlanetsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of the minor planets.
bool nearLunarEclipse()
Determine if a lunar eclipse is close at hand?
double getCustomGrsJD()
Get initial JD for calculation of position of Great Red Spot.
void setCubewanosOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of cubewanos.
Vec3f getMoonsOrbitsColor(void) const
Get the current color used to draw orbits lines of moons of planets.
Vec3f getOortCloudObjectsOrbitsColor(void) const
Get the current color used to draw orbits lines of Oort cloud objects.
Vec3f getSaturnOrbitColor(void) const
Get the current color used to draw Saturn orbit line.
int getCustomGrsLongitude()
Get longitude of Great Red Spot (System II is used)
void setEarthOrbitColor(const Vec3f &c)
Set the color used to draw Earth orbit line.
Main class for Stellarium core processing.
Definition: StelCore.hpp:48
PlanetP getMoon() const
Get the Planet object pointer for Earth&#39;s moon.
void computePositions(double dateJDE, const Vec3d &observerPos=Vec3d(0.))
Compute the position and transform matrix for every element of the solar system.
void setOortCloudObjectsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of Oort cloud objects.
bool getFlagTrails() const
Get the current value of the flag which determines if planet trails are drawn or hidden.
void setFlagHints(bool b)
Set flag which determines if planet hints are drawn or hidden along labels.
void setCustomGrsLongitude(int longitude)
Set longitude of Great Red Spot (System II is used)
bool getFlagLightTravelTime(void) const
Get the current value of the flag which determines if light travel time calculation is used or not...
void setFlagLabels(bool b)
Set flag which determines if planet labels are drawn or hidden.
Vec3f getUranusOrbitColor(void) const
Get the current color used to draw Uranus orbit line.
void setScatteredDiskObjectsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of scattered disk objects.
void setApparentMagnitudeAlgorithmOnEarth(QString algorithm)
Set the algorithm for computation of apparent magnitudes for planets in case observer on the Earth...
Vec3f getMercuryOrbitColor(void) const
Get the current color used to draw Mercury orbit line.
bool getFlagLabels() const
Get the current value of the flag which determines if planet labels are drawn or hidden.
bool getFlagPlanets() const
Get the current value of the flag which determines if planet are drawn or hidden. ...
Vec3f getCometsOrbitsColor(void) const
Get the current color used to draw comet orbit lines.
Specialization of StelModule which manages a collection of StelObject.
virtual QList< StelObjectP > searchAround(const Vec3d &v, double limitFov, const StelCore *core) const
Search for SolarSystem objects in some area around a point.
const QList< PlanetP > & getAllPlanets() const
Get the list of all the bodies of the solar system.
void setVenusOrbitColor(const Vec3f &c)
Set the color used to draw Venus orbit line.
QStringList getObjectsList(QString objType="all") const
Get list of objects by type.
void setJupiterOrbitColor(const Vec3f &c)
Set the color used to draw Jupiter orbit line.
void setOrbitsColor(const Vec3f &c)
Set the color used to draw solar system object orbit lines.
This StelObjectModule derivative is used to model SolarSystem bodies.
Definition: SolarSystem.hpp:47
void setFlagPointer(bool b)
Set flag which determines if the planet pointer (red cross) is drawn or hidden on a selected planet...
virtual QStringList listAllObjects(bool inEnglish) const
List all StelObjects.
void setNeptuneOrbitColor(const Vec3f &c)
Set the color used to draw Neptune orbit line.
Vec3f getSednoidsOrbitsColor(void) const
Get the current color used to draw sednoid orbit lines.
void setFlagIsolatedTrails(bool b)
Set flag which enabled the showing of isolated trails for selected objects only or not...
Vec3f getTrailsColor() const
Get the current color used to draw planet trails lines.
void setFlagCustomGrsSettings(bool b)
Set flag which determines if custom settings is using for Great Red Spot on Jupiter.
Vec3f getJupiterOrbitColor(void) const
Get the current color used to draw Jupiter orbit line.
void setSednoidsOrbitsColor(const Vec3f &c)
Set the color used to draw sednoid orbit lines.
double getEclipseFactor(const StelCore *core) const
Determines relative amount of sun visible from the observer&#39;s position.
Provide the main interface to all operations of projecting coordinates from sky to screen...
bool getFlagIsolatedTrails(void) const
Get the current value of the flag which enables showing of isolated trails for selected objects only ...
double getMoonScale(void) const
Get the display scaling factor for Earth&#39;s moon.
bool getFlagIsolatedOrbits(void) const
Get the current value of the flag which enables showing of isolated orbits for selected objects only ...
void setFlagTranslatedNames(bool b)
Set flag which enable use translated names for planets or not.
double getDistanceToPlanet(QString planetName) const
Get distance to Solar system bodies from scripts.
Vec3f getMinorPlanetsOrbitsColor(void) const
Get the current color used to draw orbits lines of the minor planets.
void setPlutinosOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of plutinos.
QStringList getAllPlanetLocalizedNames() const
Get the list of all the planet localized names.
Vec3f getOrbitsColor(void) const
Get the current color used to draw solar system object orbit lines.
Vec3f getMajorPlanetsOrbitsColor(void) const
Get the current color used to draw orbits lines of the major planets.
void setFlagNativePlanetNames(bool b)
Set flag which enable use native names for planets or not.
double getPhaseAngleForPlanet(QString planetName) const
Get phase angle for Solar system bodies from scripts.
virtual void init()
Initialize the SolarSystem.
StelModuleActionName
Define the possible action for which an order is defined.
Definition: StelModule.hpp:121
Vec3f getVenusOrbitColor(void) const
Get the current color used to draw Venus orbit line.
Vec3f getScatteredDiskObjectsOrbitsColor(void) const
Get the current color used to draw orbits lines of scattered disk objects.
void setMarsOrbitColor(const Vec3f &c)
Set the color used to draw Mars orbit line.
virtual StelObjectP searchByNameI18n(const QString &nameI18n) const
Search for a SolarSystem object based on the localised name.
Vec3f getCubewanosOrbitsColor(void) const
Get the current color used to draw orbits lines of cubewanos.
void setMajorPlanetsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of the major planets.
Vec3f getMarsOrbitColor(void) const
Get the current color used to draw Mars orbit line.
void setLabelsColor(const Vec3f &c)
Set the color used to draw planet labels.
void setOrbitColorStyle(QString style)
Set style of colors of orbits for Solar system bodies.
StelModuleSelectAction
Enum used when selecting objects to define whether to add to, replace, or remove from the existing se...
Definition: StelModule.hpp:111
double labelsAmount
The amount of planets labels (between 0 and 10).
void setTrailsColor(const Vec3f &c)
Set the color used to draw planet trails lines.
void setLabelsAmount(double a)
Set the amount of planet labels.
void setFontSize(float newFontSize)
Set planet names font size.
bool getFlagOrbits() const
Get the current value of the flag which determines if planet orbits are drawn or hidden.
void setSaturnOrbitColor(const Vec3f &c)
Set the color used to draw Saturn orbit line.
void setMoonsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of moons of planets.
void setMoonScale(double f)
Set the display scaling factor for Earth&#39;s moon.
void updateI18n()
Translate names. (public so that SolarSystemEditor can call it).
QString getOrbitColorStyle() const
Get style of colors of orbits for Solar system bodies.
virtual void deinit()
Called before the module will be delete, and before the openGL context is suppressed.
QSharedPointer< StelTexture > StelTextureSP
Use shared pointer to simplify memory managment.
void setMercuryOrbitColor(const Vec3f &c)
Set the color used to draw Mercury orbit line.
bool getFlagHints() const
Get the current value of the flag which determines if planet hints are drawn or hidden along labels...
virtual QStringList listAllObjectsByType(const QString &objType, bool inEnglish) const
List all StelObjects by type.
Main class for the GUI based on QGraphicView.
Definition: StelGui.hpp:53
void setCometsOrbitsColor(const Vec3f &c)
Set the color used to draw comet orbit lines.
void setFlagPlanets(bool b)
Set flag which determines if planets are drawn or hidden.
QString getPlanetType(QString planetName) const
Get type for Solar system bodies from scripts.
float getPlanetVMagnitude(QString planetName, bool withExtinction=false) const
Get the V magnitude for Solar system bodies from scripts.
void setCustomGrsDrift(double drift)
Set speed of annual drift for Great Red Spot (System II is used)
bool getFlagPointer() const
Get the current value of the flag which determines if planet pointers are drawn or hidden...
bool getFlagNativePlanetNames(void) const
Get the current value of the flag which enables showing native names for planets or not...
void setCustomGrsJD(double JD)
Set initial JD for calculation of position of Great Red Spot.
const Vec3f & getLabelsColor(void) const
Get the current color used to draw planet labels.
Vec3f getEarthOrbitColor(void) const
Get the current color used to draw Earth orbit line.
void setUranusOrbitColor(const Vec3f &c)
Set the color used to draw Uranus orbit line.
void setFlagTrails(bool b)
Set flag which determines if planet trails are drawn or hidden.
void setDwarfPlanetsOrbitsColor(const Vec3f &c)
Set the color used to draw orbits lines of the dwarf planets.
void setFlagLightTravelTime(bool b)
Set flag which determines if the light travel time calculation is used or not.
PlanetP searchByEnglishName(QString planetEnglishName) const
Get a pointer to a Planet object.
virtual void draw(StelCore *core)
Draw SolarSystem objects (planets).
virtual StelObjectP searchByName(const QString &name) const
Search for a SolarSystem object based on the English name.