Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

core/modules/MinorPlanet.hpp

00001 /*
00002  * Stellarium
00003  * Copyright (C) 2010 Bogdan Marinov
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018  */
00019  
00020 #ifndef _MINOR_PLANET_HPP_
00021 #define _MINOR_PLANET_HPP_
00022 
00023 #include "Planet.hpp"
00024 
00037 class MinorPlanet : public Planet
00038 {
00039 public:
00040     MinorPlanet(const QString& englishName,
00041            int flagLighting,
00042            double radius,
00043            double oblateness,
00044            Vec3f color,
00045            float albedo,
00046            const QString& texMapName,
00047            posFuncType _coordFunc,
00048            void* userDataPtr,
00049            OsulatingFunctType *osculatingFunc,
00050            bool closeOrbit,
00051            bool hidden);
00052 
00053     ~MinorPlanet();
00054 
00055     //Inherited from StelObject via Planet
00068     virtual QString getInfoString(const StelCore *core, const InfoStringGroup &flags) const;
00070     virtual QString getType() const {return "MinorPlanet";}
00071     virtual float getVMagnitude(const StelNavigator *nav) const;
00074     virtual void translateName(StelTranslator& trans);
00075 
00081     void setMinorPlanetNumber(int number);
00082 
00088     void setProvisionalDesignation(QString designation);
00089 
00090 
00095     void setAbsoluteMagnitudeAndSlope(double magnitude, double slope);
00096 
00100     static QString renderProvisionalDesignationinHtml(QString plainText);
00101 
00102 
00103 private:
00104     int minorPlanetNumber;
00105     double absoluteMagnitude;
00106     double slopeParameter;
00107 
00108     bool nameIsProvisionalDesignation;
00109     QString provisionalDesignationHtml;
00110     QString properName;
00111 };
00112 
00113 #endif //_MINOR_PLANET_HPP_