Stellarium 0.11.1
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure
Public Slots | Public Member Functions
SolarSystem Class Reference

#include <SolarSystem.hpp>

List of all members.

Public Slots

void setFlagPlanets (bool b)
bool getFlagPlanets () const
void setFlagTrails (bool b)
bool getFlagTrails () const
void setFlagHints (bool b)
bool getFlagHints () const
void setFlagLabels (bool b)
bool getFlagLabels () const
void setLabelsAmount (float a)
float getLabelsAmount (void) const
void setFlagOrbits (bool b)
bool getFlagOrbits () const
void setFlagLightTravelTime (bool b)
bool getFlagLightTravelTime (void) const
void setFontSize (float newFontSize)
void setLabelsColor (const Vec3f &c)
const Vec3fgetLabelsColor (void) const
void setOrbitsColor (const Vec3f &c)
Vec3f getOrbitsColor (void) const
void setTrailsColor (const Vec3f &c)
Vec3f getTrailsColor () const
void setFlagMoonScale (bool b)
bool getFlagMoonScale (void) const
void setMoonScale (float f)
float getMoonScale (void) const
void updateI18n ()

Public Member Functions

virtual void init ()
virtual void draw (StelCore *core)
virtual void update (double deltaTime)
virtual double getCallOrder (StelModuleActionName actionName) const
virtual QList< StelObjectPsearchAround (const Vec3d &v, double limitFov, const StelCore *core) const
virtual StelObjectP searchByNameI18n (const QString &nameI18n) const
virtual StelObjectP searchByName (const QString &name) const
virtual QStringList listMatchingObjectsI18n (const QString &objPrefix, int maxNbItem=5) const
PlanetP searchByEnglishName (QString planetEnglishName) const
PlanetP getSun () const
PlanetP getEarth () const
PlanetP getMoon () const
bool nearLunarEclipse ()
QStringList getAllPlanetEnglishNames () const
QStringList getAllPlanetLocalizedNames () const
void reloadPlanets ()
QString getPlanetHashString ()
void computePositions (double date, const Vec3d &observerPos=Vec3d(0.))
const QList< PlanetP > & getAllPlanets () const

Detailed Description

This StelObjectModule derivative is used to model SolarSystem bodies.

This includes the Major Planets, Minor Planets and Comets.


Member Function Documentation

void SolarSystem::computePositions ( double  date,
const Vec3d observerPos = Vec3d(0.) 
)

Compute the position and transform matrix for every element of the solar system.

Parameters:
observerPosPosition of the observer in heliocentric ecliptic frame (Required for light travel time computation).
datethe date in JDay
Deprecated:
??? In the "deprecated" section, but used in SolarSystem::init() and StelNavigator::updateTime()
virtual void SolarSystem::draw ( StelCore core) [virtual]

Draw SolarSystem objects (planets).

Parameters:
coreThe StelCore object.
Returns:
The maximum squared distance in pixels that any SolarSystem object has travelled since the last update.

Reimplemented from StelModule.

const QList<PlanetP>& SolarSystem::getAllPlanets ( ) const [inline]

Get the list of all the bodies of the solar system.

Deprecated:
Used in LandscapeMgr::update(), but commented out.
bool SolarSystem::getFlagLightTravelTime ( void  ) const [inline, slot]

Get the current value of the flag which determines if light travel time calculation is used or not.

float SolarSystem::getLabelsAmount ( void  ) const [inline, slot]

Get the amount of planet labels.

The real amount is also proportional with FOV.

Returns:
the amount between 0 and 10. 0 is no labels, 10 is maximum of labels

Get a hash of locale and ssystem.ini names for use with the TUI.

Returns:
A newline delimited hash of localized:standard planet names. Planet translated name is PARENT : NAME
Deprecated:
???
virtual void SolarSystem::init ( ) [virtual]

Initialize the SolarSystem.

Includes:

  • loading planetary body orbital and model data from data/ssystem.ini
  • perform initial planet position calculation
  • set display options from application settings

Implements StelModule.

virtual QStringList SolarSystem::listMatchingObjectsI18n ( const QString &  objPrefix,
int  maxNbItem = 5 
) const [virtual]

Find objects by translated name prefix.

Find and return the list of at most maxNbItem objects auto-completing the passed object I18n name.

Parameters:
objPrefixthe case insensitive first letters of the searched object.
maxNbItemthe maximum number of returned object names.
Returns:
a list of matching object name by order of relevance, or an empty list if nothing matches.

Implements StelObjectModule.

virtual QList<StelObjectP> SolarSystem::searchAround ( const Vec3d v,
double  limitFov,
const StelCore core 
) const [virtual]

Search for SolarSystem objects in some area around a point.

Parameters:
vA vector representing a point in the sky.
limitFovThe radius of the circle around the point v which defines the size of the area to search.
corethe core object
Returns:
A STL vector of StelObjectP (pointers) containing all SolarSystem objects found in the specified area. This vector is not sorted by distance from v.

Implements StelObjectModule.

PlanetP SolarSystem::searchByEnglishName ( QString  planetEnglishName) const

Get a pointer to a Planet object.

Parameters:
planetEnglishNamethe English name of the desired planet.
Returns:
The matching planet pointer if exists or NULL.
virtual StelObjectP SolarSystem::searchByName ( const QString &  name) const [virtual]

Search for a SolarSystem object based on the English name.

Parameters:
namethe case in-sensistive English planet name.
Returns:
a StelObjectP for the object if found, else NULL.

Implements StelObjectModule.

virtual StelObjectP SolarSystem::searchByNameI18n ( const QString &  nameI18n) const [virtual]

Search for a SolarSystem object based on the localised name.

Parameters:
nameI18nthe case in-sensistive translated planet name.
Returns:
a StelObjectP for the object if found, else NULL.

Implements StelObjectModule.

void SolarSystem::setLabelsAmount ( float  a) [inline, slot]

Set the amount of planet labels.

The real amount is also proportional with FOV. The limit is set in function of the planets magnitude

Parameters:
athe amount between 0 and 10. 0 is no labels, 10 is maximum of labels
virtual void SolarSystem::update ( double  deltaTime) [virtual]

Update time-varying components.

This includes planet motion trails.

Implements StelModule.