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

StarMgr Class Reference

Stores the star catalogue data. More...

#include <StarMgr.hpp>

List of all members.

Public Slots

void setLabelColor (const Vec3f &c)
Vec3f getLabelColor (void) const
void setFlagStars (bool b)
bool getFlagStars (void) const
void setFlagLabels (bool b)
bool getFlagLabels (void) const
void setLabelsAmount (float a)
float getLabelsAmount (void) const
void setFontSize (double newFontSize)
static void setFlagSciNames (bool f)
static bool getFlagSciNames (void)

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
StelObjectP searchHP (int hip) const
QVariantList getCatalogsDescription () const
bool checkAndLoadCatalog (QVariantMap m)

Static Public Member Functions

static QString getCommonName (int hip)
static QString getSciName (int hip)
static QString convertToSpectralType (int index)
static QString convertToComponentIds (int index)

Detailed Description

Stores the star catalogue data.

Used to render the stars themselves, as well as determine the color table and render the labels of those stars with names for a given SkyCulture.

The celestial sphere is split into zones, which correspond to the triangular faces of a geodesic sphere. The number of zones (faces) depends on the level of sub-division of this sphere. The lowest level, 0, is an icosahedron (20 faces), subsequent levels, L, of sub-division give the number of zones, n as:

n=20 x 4^L

Stellarium uses levels 0 to 7 in the existing star catalogues. Star Data Records contain the position of a star as an offset from the central position of the zone in which that star is located, thus it is necessary to determine the vector from the observer to the centre of a zone, and add the star's offsets to find the absolute position of the star on the celestial sphere.

This position for a star is expressed as a 3-dimensional vector which points from the observer (at the centre of the geodesic sphere) to the position of the star as observed on the celestial sphere.

Member Function Documentation

bool StarMgr::checkAndLoadCatalog ( QVariantMap  m  ) 

Try to load the given catalog, even if it is marched as unchecked.

Mark it as checked if checksum is correct.

false in case of failure.
static QString StarMgr::getCommonName ( int  hip  )  [static]

Get the (translated) common name for a star with a specified Hipparcos catalogue number.

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

Get the amount of star labels.

The real amount is also proportional with FOV.

the amount between 0 and 10. 0 is no labels, 10 is maximum of labels
static QString StarMgr::getSciName ( int  hip  )  [static]

Get the (translated) scientific name for a star with a specified Hipparcos catalogue number.

virtual void StarMgr::init (  )  [virtual]

Initialize the StarMgr.

  • Loads the star catalogue data into memory
  • Sets up the star color table
  • Loads the star texture
  • Loads the star font (for labels on named stars)
  • Loads the texture of the sar selection indicator
  • Lets various display flags from the ini parser object

Implements StelModule.

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

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

objPrefix the case insensitive first letters of the searched object
maxNbItem the maximum number of returned object names
a list of matching object name by order of relevance, or an empty list if nothing match

Implements StelObjectModule.

virtual StelObjectP StarMgr::searchByName ( const QString &  name  )  const [virtual]

Return the matching star if exists or NULL.

name The case in-sensistive standard program planet name

Implements StelObjectModule.

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

Return the matching Stars object's pointer if exists or NULL.

nameI18n The case in-sensistive star common name or HP catalog name (format can be HP1234 or HP 1234 or HIP 1234) or sci name

Implements StelObjectModule.

StelObjectP StarMgr::searchHP ( int  hip  )  const

Search by Hipparcos catalogue number.

hip the Hipparcos catalogue number of the star which is required.
the requested StelObjectP or an empty objecy if the requested one was not found.
void StarMgr::setLabelsAmount ( float  a  )  [inline, slot]

Set the amount of star labels.

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

a the amount between 0 and 10. 0 is no labels, 10 is maximum of labels
virtual void StarMgr::update ( double  deltaTime  )  [inline, virtual]

Update any time-dependent features.

Includes fading in and out stars and labels when they are turned on and off.

Implements StelModule.

Generated on Thu May 31 10:37:21 2012 for Stellarium by  doxygen 1.6.3