![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure |
#include <StarMgr.hpp>
Inherits StelObjectModule.
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) |
QSettings * | getStarSettings (void) |
Public Member Functions | |
virtual void | init () |
virtual void | draw (StelCore *core) |
virtual void | update (double deltaTime) |
virtual void | updateI18n () |
virtual void | updateSkyCulture () |
virtual void | setStelStyle (const StelStyle &style) |
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 | search (Vec3d Pos) const |
StelObjectP | search (const QString &id) const |
StelObjectP | searchHP (int num) const |
Static Public Member Functions | |
static QString | getCommonName (int hip) |
static QString | getSciName (int hip) |
static double | getCurrentJDay (void) |
static QString | convertToSpectralType (int index) |
static QString | convertToComponentIds (int index) |
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.
virtual void StarMgr::init | ( | ) | [virtual] |
Initialize the StarMgr.
Implements StelModule.
virtual void StarMgr::draw | ( | StelCore * | core | ) | [virtual] |
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::updateI18n | ( | ) | [virtual] |
virtual void StarMgr::updateSkyCulture | ( | ) | [virtual] |
Called when the sky culture is updated.
Loads common and scientific names of stars for a given sky culture.
Reimplemented from StelModule.
virtual void StarMgr::setStelStyle | ( | const StelStyle & | style | ) | [virtual] |
virtual double StarMgr::getCallOrder | ( | StelModuleActionName | actionName | ) | const [virtual] |
Used to determine the order in which the various StelModules are drawn.
Reimplemented from StelModule.
virtual QList<StelObjectP > StarMgr::searchAround | ( | const Vec3d & | v, | |
double | limitFov, | |||
const StelCore * | core | |||
) | const [virtual] |
Return a stl vector containing the stars located inside the limFov circle around position v.
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 sci name |
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 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.
void StarMgr::setLabelColor | ( | const Vec3f & | c | ) | [inline, slot] |
Set the color used to label bright stars.
Vec3f StarMgr::getLabelColor | ( | void | ) | const [inline, slot] |
Get the current color used to label bright stars.
void StarMgr::setFlagStars | ( | bool | b | ) | [inline, slot] |
Set display flag for Stars.
bool StarMgr::getFlagStars | ( | void | ) | const [inline, slot] |
Get display flag for Stars.
void StarMgr::setFlagLabels | ( | bool | b | ) | [inline, slot] |
Set display flag for Star names (labels).
bool StarMgr::getFlagLabels | ( | void | ) | const [inline, slot] |
Get display flag for Star names (labels).
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 |
float StarMgr::getLabelsAmount | ( | void | ) | const [inline, slot] |
Get the amount of star labels.
The real amount is also proportional with FOV.
void StarMgr::setFontSize | ( | double | newFontSize | ) | [slot] |
Define font size to use for star names display.
static void StarMgr::setFlagSciNames | ( | bool | f | ) | [inline, static, slot] |
Show scientific or catalog names on stars without common names.
StelObjectP StarMgr::search | ( | Vec3d | Pos | ) | const |
Search for the nearest star to some position.
Pos | the 3d vector representing the direction to search. |
StelObjectP StarMgr::search | ( | const QString & | id | ) | const |
Search for a star by catalogue number (including catalogue prefix).
id | the catalogue identifier for the required star. |
StelObjectP StarMgr::searchHP | ( | int | num | ) | const |
Search bu Hipparcos catalogue number.
num | the Hipparcos catalogue number of the star which is required. |
static QString StarMgr::getCommonName | ( | int | hip | ) | [static] |
Get the (translated) common name for a star with a specified Hipparcos catalogue number.
static QString StarMgr::getSciName | ( | int | hip | ) | [static] |
Get the (translated) scientific name for a star with a specified Hipparcos catalogue number.