Stellarium 0.13.1
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 color,
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 &pType);
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 
85  void setMinorPlanetNumber(int number);
86 
92  void setProvisionalDesignation(QString designation);
93 
94 
99  void setAbsoluteMagnitudeAndSlope(double magnitude, double slope);
100 
104  static QString renderProvisionalDesignationinHtml(QString plainText);
105 
107  void setSemiMajorAxis(double value);
108 
110  double getSiderealPeriod() const;
111 
112 private:
113  int minorPlanetNumber;
114  float absoluteMagnitude;
115  float slopeParameter;
116  double semiMajorAxis;
117 
118  bool nameIsProvisionalDesignation;
119  QString provisionalDesignationHtml;
120  QString properName;
121 };
122 
123 #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:46
void setSemiMajorAxis(double value)
set value for semi-major axis in AU
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.