StarMgr.hpp   StarMgr.hpp 
skipping to change at line 25 skipping to change at line 25
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#ifndef _STARMGR_HPP_ #ifndef _STARMGR_HPP_
#define _STARMGR_HPP_ #define _STARMGR_HPP_
#include <vector> #include <vector>
#include <map> #include <map>
#include "Fader.hpp" #include "StelFader.hpp"
#include "StelObjectModule.hpp" #include "StelObjectModule.hpp"
#include "STextureTypes.hpp" #include "StelTextureTypes.hpp"
#include "StelProjectorType.hpp"
class StelObject; class StelObject;
class ToneReproducer; class StelToneReproducer;
class Projector; class StelProjector;
class Navigator; class StelNavigator;
class LoadingBar; class StelLoadingBar;
class SFont; class StelFont;
class QSettings; class QSettings;
namespace BigStarCatalogExtension { namespace BigStarCatalogExtension {
class ZoneArray; class ZoneArray;
class HipIndexStruct; class HipIndexStruct;
} }
//! @class StarMgr //! @class StarMgr
//! Stores the star catalogue data. //! Stores the star catalogue data.
//! Used to render the stars themselves, as well as determine the color tab le //! Used to render the stars themselves, as well as determine the color tab le
skipping to change at line 67 skipping to change at line 68
//! the central position of the zone in which that star is located, //! the central position of the zone in which that star is located,
//! thus it is necessary to determine the vector from the observer //! 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 //! to the centre of a zone, and add the star's offsets to find the
//! absolute position of the star on the celestial sphere. //! absolute position of the star on the celestial sphere.
//! //!
//! This position for a star is expressed as a 3-dimensional vector //! This position for a star is expressed as a 3-dimensional vector
//! which points from the observer (at the centre of the geodesic sphere) //! which points from the observer (at the centre of the geodesic sphere)
//! to the position of the star as observed on the celestial sphere. //! to the position of the star as observed on the celestial sphere.
class StarMgr : public StelObjectModule class StarMgr : public StelObjectModule
{ {
Q_OBJECT; Q_OBJECT
public: public:
StarMgr(void); StarMgr(void);
~StarMgr(void); ~StarMgr(void);
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Methods defined in the StelModule class // Methods defined in the StelModule class
//! Initialize the StarMgr. //! Initialize the StarMgr.
//! - Loads the star catalogue data into memory //! - Loads the star catalogue data into memory
//! - Sets up the star color table //! - Sets up the star color table
skipping to change at line 157 skipping to change at line 158
//! @return the amount between 0 and 10. 0 is no labels, 10 is maxim um of labels //! @return the amount between 0 and 10. 0 is no labels, 10 is maxim um of labels
float getLabelsAmount(void) const {return labelsAmount;} float getLabelsAmount(void) const {return labelsAmount;}
//! Define font size to use for star names display. //! Define font size to use for star names display.
void setFontSize(double newFontSize); void setFontSize(double newFontSize);
//! Show scientific or catalog names on stars without common names. //! Show scientific or catalog names on stars without common names.
static void setFlagSciNames(bool f) {flagSciNames = f;} static void setFlagSciNames(bool f) {flagSciNames = f;}
static bool getFlagSciNames(void) {return flagSciNames;} static bool getFlagSciNames(void) {return flagSciNames;}
QSettings* getStarSettings(void) {return starSettings;}
public: public:
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Other methods // Other methods
//! Search for the nearest star to some position. //! Search for the nearest star to some position.
//! @param Pos the 3d vector representing the direction to search. //! @param Pos the 3d vector representing the direction to search.
//! @return the nearest star from the specified position, or an //! @return the nearest star from the specified position, or an
//! empty StelObjectP if none were found close by. //! empty StelObjectP if none were found close by.
StelObjectP search(Vec3d Pos) const; StelObjectP search(Vec3d Pos) const;
//! Search for a star by catalogue number (including catalogue prefi x). //! Search for a star by catalogue number (including catalogue prefi x).
skipping to change at line 186 skipping to change at line 189
StelObjectP searchHP(int num) const; StelObjectP searchHP(int num) const;
//! Get the (translated) common name for a star with a specified //! Get the (translated) common name for a star with a specified
//! Hipparcos catalogue number. //! Hipparcos catalogue number.
static QString getCommonName(int hip); static QString getCommonName(int hip);
//! Get the (translated) scientific name for a star with a specified //! Get the (translated) scientific name for a star with a specified
//! Hipparcos catalogue number. //! Hipparcos catalogue number.
static QString getSciName(int hip); static QString getSciName(int hip);
// TODO: the StarMgr it self should call core()->getGeodesicGrid()->
setMaxlevel etc..
//! Get the maximum level of the geodesic sphere used.
//! See the class description for a short introduction to the meanin
g of this value.
int getMaxGridLevel(void) const {return maxGeodesicGridLevel;}
//! Initializes each triangular face of the geodesic grid.
void setGrid(class GeodesicGrid* grid);
static double getCurrentJDay(void) {return currentJDay;} static double getCurrentJDay(void) {return currentJDay;}
static QString convertToSpectralType(int index); static QString convertToSpectralType(int index);
static QString convertToComponentIds(int index); static QString convertToComponentIds(int index);
private: private:
//! Loads common names for stars from a file. //! Loads common names for stars from a file.
//! Called when the SkyCulture is updated. //! Called when the SkyCulture is updated.
//! @param the path to a file containing the common names for bright stars. //! @param the path to a file containing the common names for bright stars.
skipping to change at line 217 skipping to change at line 213
//! @param the path to a file containing the scientific names for br ight stars. //! @param the path to a file containing the scientific names for br ight stars.
void loadSciNames(const QString& sciNameFile); void loadSciNames(const QString& sciNameFile);
//! Gets the maximum search level. //! Gets the maximum search level.
// TODO: add a non-lame description - what is the purpose of the max search level? // TODO: add a non-lame description - what is the purpose of the max search level?
int getMaxSearchLevel() const; int getMaxSearchLevel() const;
//! Load all the stars from the files. //! Load all the stars from the files.
void loadData(); void loadData();
//! Load config data from star.ini
void loadStarSettings(void);
//! Draw a nice animated pointer around the object. //! Draw a nice animated pointer around the object.
void drawPointer(const Projector* prj, const Navigator * nav); void drawPointer(const StelProjectorP& prj, const StelNavigator * na v);
LinearFader labelsFader; LinearFader labelsFader;
LinearFader starsFader; LinearFader starsFader;
bool flagStarName; bool flagStarName;
float labelsAmount; float labelsAmount;
bool gravityLabel; bool gravityLabel;
int maxGeodesicGridLevel; int maxGeodesicGridLevel;
int lastMaxSearchLevel; int lastMaxSearchLevel;
skipping to change at line 258 skipping to change at line 257
static std::map<int, QString> commonNamesMapI18n; static std::map<int, QString> commonNamesMapI18n;
static std::map<QString, int> commonNamesIndex; static std::map<QString, int> commonNamesIndex;
static std::map<QString, int> commonNamesIndexI18n; static std::map<QString, int> commonNamesIndexI18n;
static std::map<int, QString> sciNamesMapI18n; static std::map<int, QString> sciNamesMapI18n;
static std::map<QString, int> sciNamesIndexI18n; static std::map<QString, int> sciNamesIndexI18n;
static double currentJDay; static double currentJDay;
double fontSize; double fontSize;
SFont *starFont; StelFont *starFont;
static bool flagSciNames; static bool flagSciNames;
Vec3f labelColor; Vec3f labelColor;
STextureSP texPointer; // The selection pointer texture StelTextureSP texPointer; // The selection pointer tex
ture
QSettings* starSettings;
}; };
#endif // _STARMGR_HPP_ #endif // _STARMGR_HPP_
 End of changes. 10 change blocks. 
20 lines changed or deleted 20 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/