![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
Stores the star catalogue data. More...
#include <StarMgr.hpp>
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 void | updateI18n () |
virtual void | updateSkyCulture (const QString &skyCultureDir) |
virtual void | setStelStyle (const QString §ion) |
virtual double | getCallOrder (StelModuleActionName actionName) const |
virtual QList< StelObjectP > | searchAround (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) |
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.
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.
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.
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.
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 |
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. |
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] |
Draw all the stars.
Update any time-dependent features. Includes fading in and out stars and labels when they are turned on and off.
Implements StelModule.
virtual void StarMgr::updateSkyCulture | ( | const QString & | skyCultureDir | ) | [virtual] |
Called when the sky culture is updated.
Loads common and scientific names of stars for a given sky culture.
skyCultureDir | the name of the directory containing the sky culture to use. |
Reimplemented from StelModule.