25 #include "StelObject.hpp" 
   26 #include "StelProjector.hpp" 
   27 #include "VecMath.hpp" 
   28 #include "StelFader.hpp" 
   29 #include "renderer/GenericVertexTypes.hpp" 
   30 #include "renderer/StelIndexBuffer.hpp" 
   31 #include "renderer/StelVertexBuffer.hpp" 
   36 typedef void (*posFuncType)(double, 
double*, 
void*);
 
   38 typedef void (OsculatingFunctType)(
double jd0,
double jd,
double xyz[3]);
 
   41 #define J2000 2451545.0 
   42 #define ORBIT_SEGMENTS 360 
   66     RotationElements(
void) : period(1.), offset(0.), epoch(J2000), obliquity(0.), ascendingNode(0.), precessionRate(0.) {}
 
   73     double siderealPeriod; 
 
   81     Ring(
double radiusMin,
double radiusMax,
const QString &texname);
 
   98     double getSize(
void)
 const {
return radiusMax;}
 
  100     const double radiusMin;
 
  101     const double radiusMax;
 
  103     const QString texName;
 
  147     Planet(
const QString& englishName,
 
  153            const QString& texMapName,
 
  154            posFuncType _coordFunc,
 
  156            OsculatingFunctType *osculatingFunc,
 
  160            const QString &pType);
 
  183     virtual double getParentSatellitesFov(
const StelCore* core) 
const;
 
  187     virtual QString 
getType(
void)
 const {
return "Planet";}
 
  192     virtual bool hasAtmosphere(
void) {
return atmosphere;}
 
  207               const QFont& planetNameFont, SharedPlanetGraphics& planetGraphics);
 
  221     const QString& getTextMapName()
 const {
return texMapName;}  
 
  224     double getSiderealTime(
double jd) 
const;
 
  225     Mat4d getRotEquatorialToVsop87(
void) 
const;
 
  226     void setRotEquatorialToVsop87(
const Mat4d &m);
 
  231     void computePositionWithoutOrbits(
const double date);
 
  232     void computePosition(
const double date);
 
  235     void computeTransMatrix(
double date);
 
  238     void computeModelMatrix(
Mat4d& result) 
const;
 
  241     double getPhaseAngle(
const Vec3d& obsPos) 
const;
 
  243     double getElongation(
const Vec3d& obsPos) 
const;
 
  245     double getSpheroidAngularSize(
const StelCore* core) 
const;
 
  247     float getPhase(
const Vec3d& obsPos) 
const;
 
  250     void setRotationElements(
float _period, 
float _offset, 
double _epoch,
 
  251                  float _obliquity, 
float _ascendingNode,
 
  252                  float _precessionRate, 
double _siderealPeriod);
 
  253     double getRotAscendingnode(
void)
 const {
return re.ascendingNode;}
 
  254     double getRotObliquity(
void)
 const {
return re.obliquity;}
 
  260     Vec3d getHeliocentricEclipticPos() 
const;
 
  264     void setHeliocentricEclipticPos(
const Vec3d &pos);
 
  267     double computeDistance(
const Vec3d& obsHelioPos);
 
  268     double getDistance(
void)
 const {
return distance;}
 
  270     void setRings(
Ring* r) {rings = r;}
 
  272     void setSphereScale(
float s);
 
  274     float getSphereScale(
void)
 const {
return sphereScale;}
 
  276     const QSharedPointer<Planet> getParent(
void)
 const {
return parent;}
 
  278     static void setLabelColor(
const Vec3f& lc) {labelColor = lc;}
 
  279     static const Vec3f& getLabelColor(
void) {
return labelColor;}
 
  281     void update(
int deltaTime);
 
  300         Vertex2D(
const float x, 
const float y) : position(x, y){}
 
  310     Vec3d orbit[ORBIT_SEGMENTS+1];   
 
  311     Vec3d orbitP[ORBIT_SEGMENTS+1];  
 
  320     static Vec3f orbitColor;
 
  321     static void setOrbitColor(
const Vec3f& oc) {orbitColor = oc;}
 
  322     static const Vec3f& getOrbitColor() {
return orbitColor;}
 
  327                          SharedPlanetGraphics& planetGraphics);
 
  330     QString getSkyLabel(
const StelCore* core) 
const;
 
  340                      SharedPlanetGraphics& planetGraphics,
 
  364                    const struct StelLight* light, SharedPlanetGraphics &planetGraphics, 
float screenSz);
 
  368                    const QFont& planetNameFont, SharedPlanetGraphics& planetGraphics);
 
  378     const int flagLighting;          
 
  380     const double oneMinusOblateness; 
 
  384     Vec3d previousScreenPos;         
 
  388     Mat4d rotLocalToParent;
 
  399     posFuncType coordFunc;
 
  402     OsculatingFunctType *
const osculatingFunc;
 
  403     QSharedPointer<Planet> parent;           
 
  404     QList<QSharedPointer<Planet> > satellites;      
 
  417     static Vec3f labelColor;
 
  420 #endif // _PLANET_HPP_