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

Planet Class Reference

List of all members.

Classes

struct  SharedPlanetGraphics
 Stores graphics data that is shared between planets and must be initialized by a StelRenderer. More...
struct  Vertex2D
 A simple 2D vertex with only a position. More...

Public Member Functions

 Planet (const QString &englishName, int flagLighting, double radius, double oblateness, Vec3f color, float albedo, const QString &texMapName, posFuncType _coordFunc, void *userDataPtr, OsculatingFunctType *osculatingFunc, bool closeOrbit, bool hidden, bool hasAtmosphere, const QString &pType)
virtual QString getInfoString (const StelCore *core, const InfoStringGroup &flags) const
 Get a string with data about the Planet.
virtual double getCloseViewFov (const StelCore *core) const
 Return the best FOV in degree to use for a close view of the object.
virtual double getSatellitesFov (const StelCore *core) const
 Return the best FOV in degree to use for a global view of the object satellite system (if there are satellites).
virtual double getParentSatellitesFov (const StelCore *core) const
virtual float getVMagnitude (const StelCore *core, bool withExtinction=false) const
 Return object's apparent V magnitude as seen from observer.
virtual float getSelectPriority (const StelCore *core) const
 Return a priority value which is used to discriminate objects by priority As for magnitudes, the lower is the higher priority.
virtual Vec3f getInfoColor (void) const
 Get a color used to display info about the object.
virtual QString getType (void) const
 Return object's type. It should be the name of the class.
virtual Vec3d getJ2000EquatorialPos (const StelCore *core) const
 Get observer-centered equatorial coordinates at equinox J2000.
virtual QString getEnglishName (void) const
 Return object's name in english.
virtual QString getNameI18n (void) const
 Return translated object's name.
virtual double getAngularSize (const StelCore *core) const
 Return the angular radius of a circle containing the object as seen from the observer with the circle center assumed to be at getJ2000EquatorialPos().
virtual bool hasAtmosphere (void)
virtual void translateName (StelTranslator &trans)
 Translate planet name using the passed translator.
void draw (StelCore *core, class StelRenderer *renderer, float maxMagLabels, const QFont &planetNameFont, SharedPlanetGraphics &planetGraphics)
 Draw the Planet.
double getRadius (void) const
 Get the radius of the planet in AU.
double getSiderealDay (void) const
double getSiderealPeriod (void) const
const QString & getTextMapName () const
double getSiderealTime (double jd) const
Mat4d getRotEquatorialToVsop87 (void) const
void setRotEquatorialToVsop87 (const Mat4d &m)
const RotationElementsgetRotationElements (void) const
void computePositionWithoutOrbits (const double date)
void computePosition (const double date)
void computeTransMatrix (double date)
void computeModelMatrix (Mat4d &result) const
double getPhaseAngle (const Vec3d &obsPos) const
double getElongation (const Vec3d &obsPos) const
double getSpheroidAngularSize (const StelCore *core) const
float getPhase (const Vec3d &obsPos) const
void setRotationElements (float _period, float _offset, double _epoch, float _obliquity, float _ascendingNode, float _precessionRate, double _siderealPeriod)
double getRotAscendingnode (void) const
double getRotObliquity (void) const
Vec3d getEclipticPos () const
 Get the Planet position in the parent Planet ecliptic coordinate in AU.
Vec3d getHeliocentricEclipticPos () const
Vec3d getHeliocentricPos (Vec3d) const
void setHeliocentricEclipticPos (const Vec3d &pos)
double computeDistance (const Vec3d &obsHelioPos)
double getDistance (void) const
void setRings (Ring *r)
void setSphereScale (float s)
float getSphereScale (void) const
const QSharedPointer< PlanetgetParent (void) const
void update (int deltaTime)
void setFlagHints (bool b)
bool getFlagHints (void) const
void setFlagLabels (bool b)
bool getFlagLabels (void) const
void setFlagOrbits (bool b)
bool getFlagOrbits (void) const
void drawOrbit (const StelCore *core, class StelRenderer *renderer)

Static Public Member Functions

static void setLabelColor (const Vec3f &lc)
static const Vec3fgetLabelColor (void)
static void setOrbitColor (const Vec3f &oc)
static const Vec3fgetOrbitColor ()

Public Attributes

StelVertexBuffer< Vertex2D > * orbitVertices
 Vertex buffer used to draw the orbit.
LinearFader orbitFader
Vec3d orbit [ORBIT_SEGMENTS+1]
Vec3d orbitP [ORBIT_SEGMENTS+1]
double lastOrbitJD
double deltaJD
double deltaOrbitJD
bool orbitCached
bool closeOrbit

Static Public Attributes

static Vec3f orbitColor

Protected Member Functions

void drawEarthShadow (StelCore *core, class StelRenderer *renderer, SharedPlanetGraphics &planetGraphics)
QString getSkyLabel (const StelCore *core) const
void draw3dModel (StelCore *core, class StelRenderer *renderer, SharedPlanetGraphics &planetGraphics, StelProjector::ModelViewTranformP transfo, float screenSz)
 Draw the 3d model.
void drawUnlitSphere (class StelRenderer *renderer, StelProjectorP projector)
 Draw the unlit sphere model.
void drawSphere (class StelRenderer *renderer, StelProjectorP projector, const struct StelLight *light, SharedPlanetGraphics &planetGraphics, float screenSz)
 Draw the 3D sphere.
void drawHints (const StelCore *core, class StelRenderer *renderer, const QFont &planetNameFont, SharedPlanetGraphics &planetGraphics)

Protected Attributes

QString englishName
QString nameI18
QString texMapName
RotationElements re
const int flagLighting
const double radius
const double oneMinusOblateness
Vec3d eclipticPos
Vec3d screenPos
Vec3d previousScreenPos
Vec3f color
float albedo
Mat4d rotLocalToParent
float axisRotation
class StelTextureNewtexture
Ringrings
double distance
float sphereScale
double lastJD
posFuncType coordFunc
void * userDataPtr
OsculatingFunctType *const osculatingFunc
QSharedPointer< Planetparent
QList< QSharedPointer< Planet > > satellites
LinearFader hintFader
LinearFader labelsFader
bool flagLabels
bool hidden
bool atmosphere
QString pType
class StelGeometrySphereunlitSphere
 Sphere used to draw the planet when lighting is disabled or when it is done in shaders.
class StelGeometrySpherelitSphere
 Sphere used to draw the planet when lighting is enabled and shaders are not used.

Static Protected Attributes

static Vec3f labelColor

Detailed Description

Definition at line 110 of file Planet.hpp.


Member Function Documentation

void Planet::draw ( StelCore core,
class StelRenderer renderer,
float  maxMagLabels,
const QFont &  planetNameFont,
SharedPlanetGraphics planetGraphics 
)

Draw the Planet.

Parameters:
core The StelCore object.
renderer Renderer used for drawing.
maxMagLabels Maximum visual magnitude to draw the label at.
planetNameFont Font used to draw the planet label.
planetGraphics Graphics shared among planets.
void Planet::draw3dModel ( StelCore core,
class StelRenderer renderer,
SharedPlanetGraphics planetGraphics,
StelProjector::ModelViewTranformP  transfo,
float  screenSz 
) [protected]

Draw the 3d model.

Call the proper functions if there are rings etc. .

Parameters:
core The StelCore object.
renderer Renderer used for drawing.
planetGraphics Graphics resources shared between planets, e.g. planet lighting shader.
transfo Modelview transform.
screenSz Screen size.
void Planet::drawSphere ( class StelRenderer renderer,
StelProjectorP  projector,
const struct StelLight light,
SharedPlanetGraphics planetGraphics,
float  screenSz 
) [protected]

Draw the 3D sphere.

Parameters:
renderer Renderer to draw with.
projector Projector to project vertices.
light If NULL, lighting is not used. Otherwise the sphere is either generated with lighting (no shaders), or lit in shaders (if GLSL is supported).
planetGraphics To render the planet using a shader on the GPU if possible.
screenSz Screen size.
void Planet::drawUnlitSphere ( class StelRenderer renderer,
StelProjectorP  projector 
) [protected]

Draw the unlit sphere model.

Used either when lighting is disabled or when it is done in shaders.

Called by drawSphere.

Parameters:
renderer Renderer to draw with.
projector Projector to project the vertices.
virtual double Planet::getAngularSize ( const StelCore core  )  const [virtual]

Return the angular radius of a circle containing the object as seen from the observer with the circle center assumed to be at getJ2000EquatorialPos().

Returns:
radius in degree. This value is the apparent angular size of the object, and is independent of the current FOV.

Implements StelObject.

virtual double Planet::getCloseViewFov ( const StelCore  )  const [virtual]

Return the best FOV in degree to use for a close view of the object.

Reimplemented from StelObject.

Vec3d Planet::getEclipticPos (  )  const

Get the Planet position in the parent Planet ecliptic coordinate in AU.

virtual QString Planet::getEnglishName ( void   )  const [inline, virtual]

Return object's name in english.

Implements StelObject.

Definition at line 189 of file Planet.hpp.

virtual Vec3f Planet::getInfoColor ( void   )  const [virtual]

Get a color used to display info about the object.

Reimplemented from StelObject.

virtual QString Planet::getInfoString ( const StelCore core,
const InfoStringGroup &  flags 
) const [virtual]

Get a string with data about the Planet.

Planets support the following InfoStringGroup flags:

  • Name
  • Magnitude
  • RaDec
  • AltAzi
  • Distance
  • Size
  • PlainText
  • Extra1: Heliocentric Ecliptical Coordinates & Observer-planetocentric Ecliptical Coordinates
  • Extra2: Phase, illumination, phase angle & elongation from the Sun
    Parameters:
    core the StelCore object
    flags a set of InfoStringGroup items to include in the return value.
    Returns:
    a QString containing an HMTL encoded description of the Planet.

Implements StelObject.

Reimplemented in Comet, and MinorPlanet.

virtual Vec3d Planet::getJ2000EquatorialPos ( const StelCore core  )  const [virtual]

Get observer-centered equatorial coordinates at equinox J2000.

Implements StelObject.

virtual QString Planet::getNameI18n ( void   )  const [inline, virtual]

Return translated object's name.

Implements StelObject.

Definition at line 190 of file Planet.hpp.

double Planet::getRadius ( void   )  const [inline]

Get the radius of the planet in AU.

Returns:
the radius of the planet in astronomical units.

Definition at line 213 of file Planet.hpp.

virtual double Planet::getSatellitesFov ( const StelCore  )  const [virtual]

Return the best FOV in degree to use for a global view of the object satellite system (if there are satellites).

Reimplemented from StelObject.

virtual float Planet::getSelectPriority ( const StelCore  )  const [virtual]

Return a priority value which is used to discriminate objects by priority As for magnitudes, the lower is the higher priority.

Reimplemented from StelObject.

virtual QString Planet::getType ( void   )  const [inline, virtual]

Return object's type. It should be the name of the class.

Implements StelObject.

Definition at line 187 of file Planet.hpp.

virtual float Planet::getVMagnitude ( const StelCore core,
bool  withExtinction = false 
) const [virtual]

Return object's apparent V magnitude as seen from observer.

Reimplemented from StelObject.

Reimplemented in Comet, and MinorPlanet.

virtual void Planet::translateName ( StelTranslator trans  )  [virtual]

Translate planet name using the passed translator.

Reimplemented in MinorPlanet.


Member Data Documentation

Sphere used to draw the planet when lighting is enabled and shaders are not used.

Definition at line 411 of file Planet.hpp.

Vertex buffer used to draw the orbit.

Definition at line 301 of file Planet.hpp.

Sphere used to draw the planet when lighting is disabled or when it is done in shaders.

Definition at line 409 of file Planet.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Jan 31 14:05:44 2013 for Stellarium by  doxygen 1.6.3