Stellarium 0.11.4
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)
 Set the color used to label bright stars.
Vec3f getLabelColor (void) const
 Get the current color used to label bright stars.
void setFlagStars (bool b)
 Set display flag for Stars.
bool getFlagStars (void) const
 Get display flag for Stars.
void setFlagLabels (bool b)
 Set display flag for Star names (labels).
bool getFlagLabels (void) const
 Get display flag for Star names (labels).
void setLabelsAmount (float a)
 Set the amount of star labels.
float getLabelsAmount (void) const
 Get the amount of star labels.
void setFontSize (double newFontSize)
 Define font size to use for star names display.
static void setFlagSciNames (bool f)
 Show scientific or catalog names on stars without common names.
static bool getFlagSciNames (void)

Public Member Functions

virtual void init ()
 Initialize the StarMgr.
virtual void draw (StelCore *core)
 Draw the stars and the star selection indicator if necessary.
virtual void update (double deltaTime)
 Update any time-dependent features.
virtual double getCallOrder (StelModuleActionName actionName) const
 Used to determine the order in which the various StelModules are drawn.
virtual QList< StelObjectPsearchAround (const Vec3d &v, double limitFov, const StelCore *core) const
 Return a list containing the stars located inside the limFov circle around position v.
virtual StelObjectP searchByNameI18n (const QString &nameI18n) const
 Return the matching Stars object's pointer if exists or NULL.
virtual StelObjectP searchByName (const QString &name) const
 Return the matching star if exists or NULL.
virtual QStringList listMatchingObjectsI18n (const QString &objPrefix, int maxNbItem=5) const
 Find and return the list of at most maxNbItem objects auto-completing the passed object I18n name.
StelObjectP searchHP (int hip) const
 Search by Hipparcos catalogue number.
QVariantList getCatalogsDescription () const
bool checkAndLoadCatalog (QVariantMap m)
 Try to load the given catalog, even if it is marched as unchecked.

Static Public Member Functions

static QString getCommonName (int hip)
 Get the (translated) common name for a star with a specified Hipparcos catalogue number.
static QString getSciName (int hip)
 Get the (translated) scientific name for a star with a specified Hipparcos catalogue number.
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.

Returns:
false in case of failure.
virtual void StarMgr::draw ( StelCore core  )  [virtual]

Draw the stars and the star selection indicator if necessary.

Reimplemented from StelModule.

virtual double StarMgr::getCallOrder ( StelModuleActionName  actionName  )  const [virtual]

Used to determine the order in which the various StelModules are drawn.

Reimplemented from StelModule.

static QString StarMgr::getCommonName ( int  hip  )  [static]

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

bool StarMgr::getFlagLabels ( void   )  const [inline, slot]

Get display flag for Star names (labels).

bool StarMgr::getFlagStars ( void   )  const [inline, slot]

Get display flag for Stars.

Vec3f StarMgr::getLabelColor ( void   )  const [inline, slot]

Get the current color used to label bright stars.

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

Get the amount of star 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
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.

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

Implements StelObjectModule.

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

Return a list containing the stars located inside the limFov circle around position v.

Implements StelObjectModule.

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

Return the matching star if exists or NULL.

Parameters:
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.

Parameters:
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.

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

Set display flag for Star names (labels).

static void StarMgr::setFlagSciNames ( bool  f  )  [inline, static, slot]

Show scientific or catalog names on stars without common names.

void StarMgr::setFlagStars ( bool  b  )  [inline, slot]

Set display flag for Stars.

void StarMgr::setFontSize ( double  newFontSize  )  [slot]

Define font size to use for star names display.

void StarMgr::setLabelColor ( const Vec3f c  )  [inline, slot]

Set the color used to label bright stars.

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

Parameters:
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 Sat Aug 25 22:13:32 2012 for Stellarium by  doxygen 1.6.3