Stellarium  0.16.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  double radius,
43  double oblateness,
44  Vec3f halocolor,
45  float albedo,
46  float roughness,
47  const QString& texMapName,
48  const QString& objModelName,
49  posFuncType _coordFunc,
50  void* orbitPtr,
51  OsculatingFunctType *osculatingFunc,
52  bool closeOrbit,
53  bool hidden,
54  const QString &pTypeStr);
55 
56  ~MinorPlanet();
57 
58  //Inherited from StelObject via Planet
71  virtual QString getInfoString(const StelCore *core, const InfoStringGroup &flags) const;
72  //The Comet class inherits the "Planet" type because the SolarSystem class
73  //was not designed to handle different types of objects.
74  // \todo Decide if this is going to be "MinorPlanet" or "Asteroid"
75  //virtual QString getType() const {return "MinorPlanet";}
76  virtual float getVMagnitude(const StelCore* core) const;
79  virtual void translateName(const StelTranslator& trans);
80  virtual QString getEnglishName(void) const;
81  virtual QString getNameI18n(void) const;
82  QString getCommonEnglishName(void) const {return englishName;}
83  QString getCommonNameI18n(void) const {return nameI18;}
84 
90  void setMinorPlanetNumber(int number);
91 
97  void setProvisionalDesignation(QString designation);
98 
99 
104  void setAbsoluteMagnitudeAndSlope(const float magnitude, const float slope);
105 
109  static QString renderProvisionalDesignationinHtml(QString plainText);
110 
112  void setSemiMajorAxis(double value);
113 
115  void setSpectralType(QString sT="", QString sB="");
116 
118  void setColorIndexBV(float bv=99.f);
119 
121  double getSiderealPeriod() const;
122 
123 private:
124  int minorPlanetNumber;
125  float slopeParameter;
126  double semiMajorAxis;
127 
128  bool nameIsProvisionalDesignation;
129  QString provisionalDesignationHtml;
130  QString properName;
131 
132  float b_v;
133  QString specT, specB;
134 };
135 
136 #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 setColorIndexBV(float bv=99.f)
set value for color index B-V
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.
void setAbsoluteMagnitudeAndSlope(const float magnitude, const float slope)
sets absolute magnitude (H) and slope parameter (G).
Main class for Stellarium core processing.
Definition: StelCore.hpp:48
void setSemiMajorAxis(double value)
set value for semi-major axis in AU
void setSpectralType(QString sT="", QString sB="")
set values for spectral types
virtual QString getNameI18n(void) const
Return translated object's name.
virtual QString getEnglishName(void) const
Return object's name in english.
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.