Stellarium 0.15.2
Planet.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2002 Fabien Chereau
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18  */
19 
20 #ifndef _PLANET_HPP_
21 #define _PLANET_HPP_
22 
23 #include "StelObject.hpp"
24 #include "StelProjector.hpp"
25 #include "VecMath.hpp"
26 #include "StelFader.hpp"
27 #include "StelTextureTypes.hpp"
28 #include "StelProjectorType.hpp"
29 
30 #include <QString>
31 
32 // The callback type for the external position computation function
33 // The last variable is the userData pointer.
34 typedef void (*posFuncType)(double, double*, void*);
35 
36 typedef void (OsculatingFunctType)(double jde0,double jde,double xyz[3]);
37 
38 // epoch J2000: 12 UT on 1 Jan 2000
39 #define J2000 2451545.0
40 #define ORBIT_SEGMENTS 360
41 
42 class StelFont;
43 class StelPainter;
44 class StelTranslator;
45 class QOpenGLShaderProgram;
46 
47 // Class used to store rotational elements, i.e. axis orientation for the planetary body.
49 {
50 public:
51  RotationElements(void) : period(1.), offset(0.), epoch(J2000), obliquity(0.), ascendingNode(0.), precessionRate(0.), siderealPeriod(0.) {}
52  float period; // (sidereal) rotation period [earth days]
53  float offset; // rotation at epoch [degrees]
54  double epoch; // JDE (JD TT) of epoch for these elements
55  float obliquity; // tilt of rotation axis w.r.t. ecliptic [radians]
56  float ascendingNode; // long. of ascending node of equator on the ecliptic [radians]
57  float precessionRate; // rate of precession of rotation axis in [rads/JulianCentury(36525d)]
58  double siderealPeriod; // sidereal period (Planet year in earth days) [earth days]
59 };
60 
61 // Class to manage rings for planets like saturn
62 class Ring
63 {
64 public:
65  Ring(float radiusMin, float radiusMax,const QString &texname);
66  double getSize(void) const {return radiusMax;}
67  const float radiusMin;
68  const float radiusMax;
69  StelTextureSP tex;
70 };
71 
72 
73 class Planet : public StelObject
74 {
75 public:
76  friend class SolarSystem;
77 
78  Q_ENUMS(PlanetType)
79  Q_ENUMS(PlanetOrbitColorStyle)
80  Q_ENUMS(ApparentMagnitudeAlgorithm)
82  // GZ: Until 0.13 QStrings were used for types.
83  // GZ: Enums are slightly faster than string comparisons in time-critical comparisons.
84  // GZ: If other types are introduced, add here and the string in init().
86  {
87  isStar, // ssystem.ini: type="star"
88  isPlanet, // ssystem.ini: type="planet"
89  isMoon, // ssystem.ini: type="moon"
90  isAsteroid, // ssystem.ini: type="asteroid"
91  isPlutino, // ssystem.ini: type="plutino"
92  isComet, // ssystem.ini: type="comet"
93  isDwarfPlanet, // ssystem.ini: type="dwarf planet"
94  isCubewano, // ssystem.ini: type="cubewano"
95  isSDO, // ssystem.ini: type="scattered disc object"
96  isOCO, // ssystem.ini: type="oco"
97  isSednoid, // ssystem.ini: type="sednoid"
98  isUNDEFINED // ssystem.ini: type=<anything else>
99  };
100 
101  enum PlanetOrbitColorStyle
102  {
103  ocsOneColor, // One color for all orbits
104  ocsGroups, // Separate colors for each group of Solar system bodies
105  ocsMajorPlanets // Separate colors for each of major planets of Solar system
106  };
107 
108 /* enum ApparentMagnitudeAlgorithm
109  {
110  Planesas, // Algorithm provided by Pere Planesas (Observatorio Astronomico Nacional)
111  Mueller, // G. Mueller, based on visual observations 1877-91. [Expl.Suppl.1961]
112  Harris, // Astronomical Almanac 1984 and later. These give V (instrumental) magnitudes (D.L. Harris)
113  UndefinedAlgorithm,
114  Generic // Visual magnitude based on phase angle and albedo
115  };
116 */
117  enum ApparentMagnitudeAlgorithm
118  {
119  Mueller_1893, // G. Mueller, based on visual observations 1877-91. [Expl.Suppl.1961]
120  Astr_Alm_1984, // Astronomical Almanac 1984 and later. These give V (instrumental) magnitudes (allegedly from D.L. Harris, but this is wrong!)
121  Expl_Sup_1992, // Algorithm provided by Pere Planesas (Observatorio Astronomico Nacional) (Was called "Planesas")
122  Expl_Sup_2013, // Explanatory Supplement to the Astronomical Almanac, 3rd edition 2013
123 // Planesas, // Algorithm provided by Pere Planesas (Observatorio Astronomico Nacional)
124 // Mueller, // G. Mueller, based on visual observations 1877-91. [Expl.Suppl.1961]
125 // Harris, // Astronomical Almanac 1984 and later. These give V (instrumental) magnitudes (D.L. Harris)
126  UndefinedAlgorithm,
127  Generic // Visual magnitude based on phase angle and albedo. The formula source for this is totally unknown!
128  };
129 
130 
131  Planet(const QString& englishName,
132  int flagLighting,
133  double radius,
134  double oblateness,
135  Vec3f halocolor,
136  float albedo,
137  const QString& texMapName,
138  const QString& normalMapName,
139  posFuncType _coordFunc,
140  void* userDataPtr,
141  OsculatingFunctType *osculatingFunc,
142  bool closeOrbit,
143  bool hidden,
144  bool hasAtmosphere,
145  bool hasHalo,
146  const QString &pTypeStr);
147 
148  virtual ~Planet();
149 
151  // Currently ensured by SolarSystem::init()
152  static void init();
153 
155  // Methods inherited from StelObject
169  virtual QString getInfoString(const StelCore *core, const InfoStringGroup& flags) const;
181  virtual QVariantMap getInfoMap(const StelCore *core) const;
182  virtual double getCloseViewFov(const StelCore* core) const;
183  virtual double getSatellitesFov(const StelCore* core) const;
184  virtual double getParentSatellitesFov(const StelCore* core) const;
185  virtual float getVMagnitude(const StelCore* core) const;
186  virtual float getSelectPriority(const StelCore* core) const;
187  virtual Vec3f getInfoColor(void) const;
188  virtual QString getType(void) const {return "Planet";}
189  virtual Vec3d getJ2000EquatorialPos(const StelCore *core) const;
190  virtual QString getEnglishName(void) const;
191  virtual QString getNameI18n(void) const;
193  virtual double getAngularSize(const StelCore* core) const;
194  virtual bool hasAtmosphere(void) {return atmosphere;}
195  virtual bool hasHalo(void) {return halo;}
196 
198  // Methods of SolarSystem object
200  virtual void translateName(const StelTranslator &trans);
201 
202  // Draw the Planet
203  // GZ Made that virtual to allow comets having their own draw().
204  virtual void draw(StelCore* core, float maxMagLabels, const QFont& planetNameFont);
205 
207  // Methods specific to Planet
210  double getRadius(void) const {return radius;}
212  double getOneMinusOblateness(void) const {return oneMinusOblateness;}
214  double getSiderealDay(void) const {return re.period;}
216  // must be virtual for Comets.
217  virtual double getSiderealPeriod(void) const { return re.siderealPeriod; }
219  double getMeanSolarDay(void) const;
221  double getAlbedo(void) const { return albedo; }
222 
223  const QString& getTextMapName() const {return texMapName;}
224  const QString getPlanetTypeString() const {return pTypeMap.value(pType);}
225  PlanetType getPlanetType() const {return pType;}
226 
227  void setNativeName(QString planet) { nativeName = planet; }
228 
230  float getAbsoluteMagnitude() const {return absoluteMagnitude;}
233  float getMeanOppositionMagnitude() const;
234  ApparentMagnitudeAlgorithm getApparentMagnitudeAlgorithm() const { return vMagAlgorithm; }
235  const QString getApparentMagnitudeAlgorithmString() const { return vMagAlgorithmMap.value(vMagAlgorithm); }
236  void setApparentMagnitudeAlgorithm(QString algorithm);
237 
241  double getSiderealTime(double JD, double JDE) const;
242  Mat4d getRotEquatorialToVsop87(void) const;
243  void setRotEquatorialToVsop87(const Mat4d &m);
244 
245  const RotationElements &getRotationElements(void) const {return re;}
246  // Set the orbital elements
247  void setRotationElements(float _period, float _offset, double _epoch,
248  float _obliquity, float _ascendingNode,
249  float _precessionRate, double _siderealPeriod);
250  double getRotAscendingnode(void) const {return re.ascendingNode;}
251  // return angle between axis and normal of ecliptic plane (or, for a moon, equatorial/reference plane defined by parent).
252  // TODO: decide if this is always angle between axis and J2000 ecliptic, or should be axis//current ecliptic!
253  double getRotObliquity(double JDE) const;
254 
255 
256 
258  void computePositionWithoutOrbits(const double dateJDE);
259  void computePosition(const double dateJDE);
260 
263  void computeTransMatrix(double JD, double JDE);
264 
266  double getPhaseAngle(const Vec3d& obsPos) const;
268  double getElongation(const Vec3d& obsPos) const;
270  double getSpheroidAngularSize(const StelCore* core) const;
272  float getPhase(const Vec3d& obsPos) const;
273 
275  Vec3d getEclipticPos() const;
276 
277  // Return the heliocentric ecliptical position
278  Vec3d getHeliocentricEclipticPos() const {return getHeliocentricPos(eclipticPos);}
279 
280  // Return the heliocentric transformation for local coordinate
281  Vec3d getHeliocentricPos(Vec3d) const;
282  void setHeliocentricEclipticPos(const Vec3d &pos);
283 
284  // Compute the distance to the given position in heliocentric coordinate (in AU)
285  double computeDistance(const Vec3d& obsHelioPos);
286  double getDistance(void) const {return distance;}
287 
288  void setRings(Ring* r) {rings = r;}
289 
290  void setSphereScale(float s) {sphereScale = s;}
291  float getSphereScale(void) const {return sphereScale;}
292 
293  const QSharedPointer<Planet> getParent(void) const {return parent;}
294 
295  static void setLabelColor(const Vec3f& lc) {labelColor = lc;}
296  static const Vec3f& getLabelColor(void) {return labelColor;}
297 
298  // update displayed elements. @param deltaTime: ms (since last call)
299  virtual void update(int deltaTime);
300 
301  void setFlagHints(bool b){hintFader = b;}
302  bool getFlagHints(void) const {return hintFader;}
303 
304  void setFlagLabels(bool b){flagLabels = b;}
305  bool getFlagLabels(void) const {return flagLabels;}
306 
307  bool flagNativeName;
308  void setFlagNativeName(bool b) { flagNativeName = b; }
309  bool getFlagNativeName(void) { return flagNativeName; }
310 
311  bool flagTranslatedName;
312  void setFlagTranslatedName(bool b) { flagTranslatedName = b; }
313  bool getFlagTranslatedName(void) { return flagTranslatedName; }
314 
316  // DEPRECATED
318  // Should move to an OrbitPath class which works on a SolarSystemObject, not a Planet
319  void setFlagOrbits(bool b){orbitFader = b;}
320  bool getFlagOrbits(void) const {return orbitFader;}
321  LinearFader orbitFader;
322  // draw orbital path of Planet
323  void drawOrbit(const StelCore*);
324  Vec3d orbit[ORBIT_SEGMENTS+1]; // store heliocentric coordinates for drawing the orbit
325  Vec3d orbitP[ORBIT_SEGMENTS+1]; // store local coordinate for orbit
326  double lastOrbitJDE;
327  double deltaJDE; // time difference between positional updates.
328  double deltaOrbitJDE;
329  bool orbitCached; // whether orbit calculations are cached for drawing orbit yet
330  bool closeOrbit; // whether to connect the beginning of the orbit line to
331  // the end: good for elliptical orbits, bad for parabolic
332  // and hyperbolic orbits
333 
334  static Vec3f orbitColor;
335  static void setOrbitColor(const Vec3f& oc) {orbitColor = oc;}
336  static const Vec3f& getOrbitColor() {return orbitColor;}
337 
338  static Vec3f orbitMajorPlanetsColor;
339  static void setMajorPlanetOrbitColor(const Vec3f& oc) { orbitMajorPlanetsColor = oc;}
340  static const Vec3f& getMajorPlanetOrbitColor() {return orbitMajorPlanetsColor;}
341 
342  static Vec3f orbitMoonsColor;
343  static void setMoonOrbitColor(const Vec3f& oc) { orbitMoonsColor = oc;}
344  static const Vec3f& getMoonOrbitColor() {return orbitMoonsColor;}
345 
346  static Vec3f orbitMinorPlanetsColor;
347  static void setMinorPlanetOrbitColor(const Vec3f& oc) { orbitMinorPlanetsColor = oc;}
348  static const Vec3f& getMinorPlanetOrbitColor() {return orbitMinorPlanetsColor;}
349 
350  static Vec3f orbitDwarfPlanetsColor;
351  static void setDwarfPlanetOrbitColor(const Vec3f& oc) { orbitDwarfPlanetsColor = oc;}
352  static const Vec3f& getDwarfPlanetOrbitColor() {return orbitDwarfPlanetsColor;}
353 
354  static Vec3f orbitCubewanosColor;
355  static void setCubewanoOrbitColor(const Vec3f& oc) { orbitCubewanosColor = oc;}
356  static const Vec3f& getCubewanoOrbitColor() {return orbitCubewanosColor;}
357 
358  static Vec3f orbitPlutinosColor;
359  static void setPlutinoOrbitColor(const Vec3f& oc) { orbitPlutinosColor = oc;}
360  static const Vec3f& getPlutinoOrbitColor() {return orbitPlutinosColor;}
361 
362  static Vec3f orbitScatteredDiscObjectsColor;
363  static void setScatteredDiscObjectOrbitColor(const Vec3f& oc) { orbitScatteredDiscObjectsColor = oc;}
364  static const Vec3f& getScatteredDiscObjectOrbitColor() {return orbitScatteredDiscObjectsColor;}
365 
366  static Vec3f orbitOortCloudObjectsColor;
367  static void setOortCloudObjectOrbitColor(const Vec3f& oc) { orbitOortCloudObjectsColor = oc;}
368  static const Vec3f& getOortCloudObjectOrbitColor() {return orbitOortCloudObjectsColor;}
369 
370  static Vec3f orbitCometsColor;
371  static void setCometOrbitColor(const Vec3f& oc) { orbitCometsColor = oc;}
372  static const Vec3f& getCometOrbitColor() {return orbitCometsColor;}
373 
374  static Vec3f orbitSednoidsColor;
375  static void setSednoidOrbitColor(const Vec3f& oc) { orbitSednoidsColor = oc;}
376  static const Vec3f& getSednoidOrbitColor() {return orbitSednoidsColor;}
377 
378  static Vec3f orbitMercuryColor;
379  static void setMercuryOrbitColor(const Vec3f& oc) { orbitMercuryColor = oc;}
380  static const Vec3f& getMercuryOrbitColor() {return orbitMercuryColor;}
381 
382  static Vec3f orbitVenusColor;
383  static void setVenusOrbitColor(const Vec3f& oc) { orbitVenusColor = oc;}
384  static const Vec3f& getVenusOrbitColor() {return orbitVenusColor;}
385 
386  static Vec3f orbitEarthColor;
387  static void setEarthOrbitColor(const Vec3f& oc) { orbitEarthColor = oc;}
388  static const Vec3f& getEarthOrbitColor() {return orbitEarthColor;}
389 
390  static Vec3f orbitMarsColor;
391  static void setMarsOrbitColor(const Vec3f& oc) { orbitMarsColor = oc;}
392  static const Vec3f& getMarsOrbitColor() {return orbitMarsColor;}
393 
394  static Vec3f orbitJupiterColor;
395  static void setJupiterOrbitColor(const Vec3f& oc) { orbitJupiterColor = oc;}
396  static const Vec3f& getJupiterOrbitColor() {return orbitJupiterColor;}
397 
398  static Vec3f orbitSaturnColor;
399  static void setSaturnOrbitColor(const Vec3f& oc) { orbitSaturnColor = oc;}
400  static const Vec3f& getSaturnOrbitColor() {return orbitSaturnColor;}
401 
402  static Vec3f orbitUranusColor;
403  static void setUranusOrbitColor(const Vec3f& oc) { orbitUranusColor = oc;}
404  static const Vec3f& getUranusOrbitColor() {return orbitUranusColor;}
405 
406  static Vec3f orbitNeptuneColor;
407  static void setNeptuneOrbitColor(const Vec3f& oc) { orbitNeptuneColor = oc;}
408  static const Vec3f& getNeptuneOrbitColor() {return orbitNeptuneColor;}
409 
410  static bool permanentDrawingOrbits;
411  static PlanetOrbitColorStyle orbitColorStyle;
412 
414  QVector<const Planet*> getCandidatesForShadow() const;
415 
416 protected:
417  static StelTextureSP texEarthShadow; // for lunar eclipses
418 
419  void computeModelMatrix(Mat4d &result) const;
420 
421  Vec3f getCurrentOrbitColor();
422 
423  // Return the information string "ready to print" :)
424  QString getSkyLabel(const StelCore* core) const;
425 
426  // Draw the 3d model. Call the proper functions if there are rings etc..
427  void draw3dModel(StelCore* core, StelProjector::ModelViewTranformP transfo, float screenSz, bool drawOnlyRing=false);
428 
429  // Draw the 3D sphere
430  void drawSphere(StelPainter* painter, float screenSz, bool drawOnlyRing=false);
431 
432  // Draw the circle and name of the Planet
433  void drawHints(const StelCore* core, const QFont& planetNameFont);
434 
435  QString englishName; // english planet name
436  QString nameI18; // International translated name
437  QString nativeName; // Can be used in a skyculture
438  QString texMapName; // Texture file path
439  QString normalMapName; // Texture file path
440  int flagLighting; // Set whether light computation has to be proceed
441  RotationElements re; // Rotation param
442  double radius; // Planet radius in AU
443  double oneMinusOblateness; // (polar radius)/(equatorial radius)
444  Vec3d eclipticPos; // Position in AU in the rectangular ecliptic coordinate system
445  // centered on the parent Planet
446  Vec3d screenPos; // Used to store temporarily the 2D position on screen
447  Vec3d previousScreenPos; // The position of this planet in the previous frame.
448  Vec3f haloColor; // exclusively used for drawing the planet halo
449 
450  float albedo; // Planet albedo. Used for magnitude computation (but formula dubious!)
451  float absoluteMagnitude; // since 2017: V(1,0) from Explanatory Supplement or WGCCRE2009 paper for the planets, H in the H,G magnitude system for Minor planets, H10 for comets.
452  // This is the apparent visual magnitude when 1AU from sun and observer, with zero phase angle.
453  Mat4d rotLocalToParent; // GZ2015: was undocumented.
454  // Apparently this is the axis orientation with respect to the parent body. For planets, this is axis orientation w.r.t. VSOP87A/J2000 ecliptical system.
455  float axisRotation; // Rotation angle of the Planet on its axis.
456  // For Earth, this should be Greenwich Mean Sidereal Time GMST.
457  StelTextureSP texMap; // Planet map texture
458  StelTextureSP normalMap; // Planet normal map texture
459 
460  Ring* rings; // Planet rings
461  double distance; // Temporary variable used to store the distance to a given point
462  // it is used for sorting while drawing
463  float sphereScale; // Artificial scaling for better viewing
464  double lastJDE; // caches JDE of last positional computation
465  // The callback for the calculation of the equatorial rect heliocentric position at time JDE.
466  posFuncType coordFunc;
467  void* userDataPtr; // this is always used with an Orbit object.
468 
469  OsculatingFunctType *const osculatingFunc;
470  QSharedPointer<Planet> parent; // Planet parent i.e. sun for earth
471  QList<QSharedPointer<Planet> > satellites; // satellites of the Planet
472  LinearFader hintFader;
473  LinearFader labelsFader; // Store the current state of the label for this planet
474  bool flagLabels; // Define whether labels should be displayed
475  bool hidden; // useful for fake planets used as observation positions - not drawn or labeled
476  bool atmosphere; // Does the planet have an atmosphere?
477  bool halo; // Does the planet have a halo?
478  PlanetType pType; // Type of body
479 
480  ApparentMagnitudeAlgorithm vMagAlgorithm;
481 
482  static Vec3f labelColor;
483  static StelTextureSP hintCircleTex;
484  static QMap<PlanetType, QString> pTypeMap; // Maps fast type to english name.
485  static QMap<ApparentMagnitudeAlgorithm, QString> vMagAlgorithmMap;
486 
487  static bool flagCustomGrsSettings; // Is enabled usage of custom settings for calculation of position of Great Red Spot?
488  static double customGrsJD; // Initial JD for calculation of position of Great Red Spot
489  static int customGrsLongitude; // Longitude of Great Red Spot (System II, degrees)
490  static double customGrsDrift; // Annual drift of Great Red Spot position (degrees)
491 
492  // Shader-related variables
494  int projectionMatrix;
495  int texCoord;
496  int unprojectedVertex;
497  int vertex;
498  int texture;
499  int lightDirection;
500  int eyeDirection;
501  int diffuseLight;
502  int ambientLight;
503  int shadowCount;
504  int shadowData;
505  int sunInfo;
506  int skyBrightness;
507 
508  void initLocations(QOpenGLShaderProgram*);
509  };
510  static PlanetShaderVars planetShaderVars;
511  static QOpenGLShaderProgram* planetShaderProgram;
512 
513  // Shader-related variables
515  // Rings-specific variables
516  int isRing;
517  int ring;
518  int outerRadius;
519  int innerRadius;
520  int ringS;
521  };
522  static RingPlanetShaderVars ringPlanetShaderVars;
523  static QOpenGLShaderProgram* ringPlanetShaderProgram;
524 
526  // Moon-specific variables
527  int earthShadow;
528  int normalMap;
529  };
530  static MoonShaderVars moonShaderVars;
531  static QOpenGLShaderProgram* moonShaderProgram;
532 
533  static void initShader();
534  static void deinitShader();
535 };
536 
537 #endif // _PLANET_HPP_
538 
double getAlbedo(void) const
Get albedo.
Definition: Planet.hpp:221
virtual void update(double deltaTime)
Update time-varying components.
void setFlagOrbits(bool b)
Set flag which determines if planet orbits are drawn or hidden.
virtual double getSiderealPeriod(void) const
Get duration of sidereal year.
Definition: Planet.hpp:217
Class used to translate strings to any language.
Implementation of StelFader which implements a linear transition.
Definition: StelFader.hpp:77
The base abstract class for sky objects used in Stellarium like Stars, Planets, Constellations etc...
Definition: StelObject.hpp:36
Define the StelTextureSP type.
Vec3f getNeptuneOrbitColor(void) const
Get the current color used to draw Neptune orbit line.
PlanetType
numeric typecodes for the type descriptions in ssystem.ini
Definition: Planet.hpp:85
Vec3f getSaturnOrbitColor(void) const
Get the current color used to draw Saturn orbit line.
void setEarthOrbitColor(const Vec3f &c)
Set the color used to draw Earth orbit line.
Main class for Stellarium core processing.
Definition: StelCore.hpp:48
void setFlagHints(bool b)
Set flag which determines if planet hints are drawn or hidden along labels.
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.
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.
double getRadius(void) const
Get the radius of the planet in AU.
Definition: Planet.hpp:210
void setVenusOrbitColor(const Vec3f &c)
Set the color used to draw Venus orbit line.
void setJupiterOrbitColor(const Vec3f &c)
Set the color used to draw Jupiter orbit line.
This StelObjectModule derivative is used to model SolarSystem bodies.
Definition: SolarSystem.hpp:47
Definition: Planet.hpp:62
void setNeptuneOrbitColor(const Vec3f &c)
Set the color used to draw Neptune orbit line.
double getSiderealDay(void) const
Get duration of sidereal day.
Definition: Planet.hpp:214
Vec3f getJupiterOrbitColor(void) const
Get the current color used to draw Jupiter orbit line.
Provides functions for performing openGL drawing operations.
Definition: StelPainter.hpp:40
virtual void init()
Initialize the SolarSystem.
Vec3f getVenusOrbitColor(void) const
Get the current color used to draw Venus orbit line.
void setMarsOrbitColor(const Vec3f &c)
Set the color used to draw Mars orbit line.
QSharedPointer< ModelViewTranform > ModelViewTranformP
Shared pointer on a ModelViewTranform instance (implement reference counting)
Vec3f getMarsOrbitColor(void) const
Get the current color used to draw Mars orbit line.
double getOneMinusOblateness(void) const
Get the value (1-f) for oblateness f.
Definition: Planet.hpp:212
bool getFlagOrbits() const
Get the current value of the flag which determines if planet orbits are drawn or hidden.
A templatized 3d vector compatible with openGL.
Definition: VecMath.hpp:33
Define the StelProjectorP type.
void setSaturnOrbitColor(const Vec3f &c)
Set the color used to draw Saturn orbit line.
virtual QString getType(void) const
Return object&#39;s type. It should be the name of the class.
Definition: Planet.hpp:188
float getAbsoluteMagnitude() const
Return the absolute magnitude (read from file ssystem.ini)
Definition: Planet.hpp:230
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...
QString getPlanetType(QString planetName) const
Get type for Solar system bodies from scripts.
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.
virtual void draw(StelCore *core)
Draw SolarSystem objects (planets).