Stellarium 0.14.3
MinorPlanet.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2010 Bogdan Marinov
4  * Copyright (C) 2013-14 Georg Zotti (accuracy&speedup)
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 _MINOR_PLANET_HPP_
22 #define _MINOR_PLANET_HPP_
23 
24 #include "Planet.hpp"
25 
38 class MinorPlanet : public Planet
39 {
40 public:
41  MinorPlanet(const QString& englishName,
42  int flagLighting,
43  double radius,
44  double oblateness,
45  Vec3f halocolor,
46  float albedo,
47  const QString& texMapName,
48  posFuncType _coordFunc,
49  void* userDataPtr,
50  OsculatingFunctType *osculatingFunc,
51  bool closeOrbit,
52  bool hidden,
53  const QString &pTypeStr);
54 
55  ~MinorPlanet();
56 
57  //Inherited from StelObject via Planet
70  virtual QString getInfoString(const StelCore *core, const InfoStringGroup &flags) const;
71  //The Comet class inherits the "Planet" type because the SolarSystem class
72  //was not designed to handle different types of objects.
73  // \todo Decide if this is going to be "MinorPlanet" or "Asteroid"
74  //virtual QString getType() const {return "MinorPlanet";}
75  virtual float getVMagnitude(const StelCore* core) const;
78  virtual void translateName(const StelTranslator& trans);
79  virtual QString getEnglishName(void) const {return englishName;}
80  virtual QString getNameI18n(void) const {return nameI18;}
81 
87  void setMinorPlanetNumber(int number);
88 
94  void setProvisionalDesignation(QString designation);
95 
96 
101  void setAbsoluteMagnitudeAndSlope(double magnitude, double slope);
102 
106  static QString renderProvisionalDesignationinHtml(QString plainText);
107 
109  void setSemiMajorAxis(double value);
110 
112  double getSiderealPeriod() const;
113 
114 private:
115  int minorPlanetNumber;
116  float absoluteMagnitude;
117  float slopeParameter;
118  double semiMajorAxis;
119 
120  bool nameIsProvisionalDesignation;
121  QString provisionalDesignationHtml;
122  QString properName;
123 };
124 
125 #endif //_MINOR_PLANET_HPP_
virtual float getVMagnitude(const StelCore *core) const
Return object's apparent V magnitude as seen from observer, without including extinction.
void setAbsoluteMagnitudeAndSlope(double magnitude, double slope)
sets absolute magnitude (H) and slope parameter (G).
double getSiderealPeriod() const
get sidereal period for minor planet
Class used to translate strings to any language.
virtual void translateName(const StelTranslator &trans)
sets the nameI18 property with the appropriate translation.
Main class for Stellarium core processing.
Definition: StelCore.hpp:48
void setSemiMajorAxis(double value)
set value for semi-major axis in AU
virtual QString getNameI18n(void) const
Return translated object's name.
Definition: MinorPlanet.hpp:80
virtual QString getEnglishName(void) const
Return object's name in english.
Definition: MinorPlanet.hpp:79
void setProvisionalDesignation(QString designation)
sets a provisional designation.
virtual QString getInfoString(const StelCore *core, const InfoStringGroup &flags) const
Get a string with data about the MinorPlanet.
static QString renderProvisionalDesignationinHtml(QString plainText)
renders the subscript in a minor planet provisional designation with HTML.
void setMinorPlanetNumber(int number)
set the minor planet's number, if any.