Constellation.hpp   Constellation.hpp 
skipping to change at line 29 skipping to change at line 29
#ifndef _CONSTELLATION_HPP_ #ifndef _CONSTELLATION_HPP_
#define _CONSTELLATION_HPP_ #define _CONSTELLATION_HPP_
#include <vector> #include <vector>
#include <boost/intrusive_ptr.hpp> #include <boost/intrusive_ptr.hpp>
#include <QString> #include <QString>
#include "StelObject.hpp" #include "StelObject.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include "Fader.hpp" #include "StelFader.hpp"
#include "STextureTypes.hpp" #include "StelTextureTypes.hpp"
class StarMgr; class StarMgr;
class SFont; class StelFont;
class StelPainter;
//! @class Constellation //! @class Constellation
//! The Constellation class models a grouping of stars in a Sky Culture. //! The Constellation class models a grouping of stars in a Sky Culture.
//! Each Constellation consists of a list of stars identified by their //! Each Constellation consists of a list of stars identified by their
//! Hipparcos catalogue numbers, a name and optionally an abbreviated name, //! Hipparcos catalogue numbers, a name and optionally an abbreviated name,
//! boundary shape and an artistic pictorial representation. //! boundary shape and an artistic pictorial representation.
class Constellation : public StelObject class Constellation : public StelObject
{ {
friend class ConstellationMgr; friend class ConstellationMgr;
private: private:
skipping to change at line 65 skipping to change at line 66
{ {
if (flags&Name) return getNameI18n() + "(" + getShortName() + ")"; if (flags&Name) return getNameI18n() + "(" + getShortName() + ")";
else return ""; else return "";
} }
//! Get the module/object type string. //! Get the module/object type string.
//! @return "Constellation" //! @return "Constellation"
virtual QString getType(void) const {return "Constellation";} virtual QString getType(void) const {return "Constellation";}
//! observer centered J2000 coordinates. //! observer centered J2000 coordinates.
virtual Vec3d getObsJ2000Pos(const Navigator *nav) const {return XYZ name;} virtual Vec3d getJ2000EquatorialPos(const StelNavigator *nav) const {return XYZname;}
virtual double getAngularSize(const StelCore* core) const {assert(0) ; return 0;}; // TODO virtual double getAngularSize(const StelCore* core) const {Q_ASSERT( 0); return 0;}; // TODO
//! @param record string containing the following whitespace //! @param record string containing the following whitespace
//! separated fields: abbreviation - a three character abbreviation //! separated fields: abbreviation - a three character abbreviation
//! for the constellation, a number of lines, and a list of Hipparco s //! for the constellation, a number of lines, and a list of Hipparco s
//! catalogue numbers which, when connected form the lines of the //! catalogue numbers which, when connected form the lines of the
//! constellation. //! constellation.
//! @param starMgr a pointer to the StarManager object. //! @param starMgr a pointer to the StarManager object.
//! @return false if can't parse record, else true. //! @return false if can't parse record, else true.
bool read(const QString& record, StarMgr *starMgr); bool read(const QString& record, StarMgr *starMgr);
//! Draw the constellation name //! Draw the constellation name
void drawName(SFont * constfont, Projector* prj) const; void drawName(StelFont * constfont, const StelPainter& sPainter) con st;
//! Draw the constellation art //! Draw the constellation art
void drawArt(Projector* prj, const Navigator* nav) const; void drawArt(const StelProjectorP& prj, const StelNavigator* nav) co nst;
//! Draw the constellation boundary //! Draw the constellation boundary
void drawBoundaryOptim(Projector* prj) const; void drawBoundaryOptim(const StelProjectorP& prj) const;
//! Test if a star is part of a Constellation. //! Test if a star is part of a Constellation.
//! This member tests to see if a star is one of those which make up //! This member tests to see if a star is one of those which make up
//! the lines of a Constellation. //! the lines of a Constellation.
//! @return a pointer to the constellation which the star is a part of, //! @return a pointer to the constellation which the star is a part of,
//! or NULL if the star is not part of a constellation //! or NULL if the star is not part of a constellation
const Constellation* isStarIn(const StelObject*) const; const Constellation* isStarIn(const StelObject*) const;
//! Get the brightest star in a Constellation. //! Get the brightest star in a Constellation.
//! Checks all stars which make up the constellation lines, and retu rns //! Checks all stars which make up the constellation lines, and retu rns
skipping to change at line 107 skipping to change at line 108
//! Get the translated name for the Constellation. //! Get the translated name for the Constellation.
QString getNameI18n(void) const {return nameI18;} QString getNameI18n(void) const {return nameI18;}
//! Get the English name for the Constellation (returns the abbrevia tion). //! Get the English name for the Constellation (returns the abbrevia tion).
QString getEnglishName(void) const {return abbreviation;} QString getEnglishName(void) const {return abbreviation;}
//! Get the short name for the Constellation (returns the abbreviati on). //! Get the short name for the Constellation (returns the abbreviati on).
QString getShortName(void) const {return abbreviation;} QString getShortName(void) const {return abbreviation;}
//! Draw the lines for the Constellation. //! Draw the lines for the Constellation.
//! This method uses the coords of the stars (optimized for use thru //! This method uses the coords of the stars (optimized for use thru
//! the class ConstellationMgr only). //! the class ConstellationMgr only).
void drawOptim(Projector* prj) const; void drawOptim(const StelProjectorP& prj) const;
//! Draw the art texture, optimized function to be called thru a con stellation manager only. //! Draw the art texture, optimized function to be called thru a con stellation manager only.
void drawArtOptim(Projector* prj, const Navigator* nav) const; void drawArtOptim(const StelProjectorP& prj, const StelNavigator* na v) const;
//! Update fade levels according to time since various events. //! Update fade levels according to time since various events.
void update(int deltaTime); void update(int deltaTime);
//! Turn on and off Constellation line rendering. //! Turn on and off Constellation line rendering.
//! @param b new state for line drawing. //! @param b new state for line drawing.
void setFlagLines(bool b) {lineFader=b;} void setFlagLines(bool b) {lineFader=b;}
//! Turn on and off Constellation boundary rendering. //! Turn on and off Constellation boundary rendering.
//! @param b new state for boundary drawing. //! @param b new state for boundary drawing.
void setFlagBoundaries(bool b) {boundaryFader=b;} void setFlagBoundaries(bool b) {boundaryFader=b;}
//! Turn on and off Constellation name label rendering. //! Turn on and off Constellation name label rendering.
//! @param b new state for name label drawing. //! @param b new state for name label drawing.
skipping to change at line 152 skipping to change at line 153
QString nativeName; QString nativeName;
//! Abbreviation (of the latin name for western constellations) //! Abbreviation (of the latin name for western constellations)
QString abbreviation; QString abbreviation;
//! Direction vector pointing on constellation name drawing position //! Direction vector pointing on constellation name drawing position
Vec3f XYZname; Vec3f XYZname;
Vec3d XYname; Vec3d XYname;
//! Number of segments in the lines //! Number of segments in the lines
unsigned int numberOfSegments; unsigned int numberOfSegments;
//! List of stars forming the segments //! List of stars forming the segments
StelObjectP* asterism; StelObjectP* asterism;
STextureSP artTexture; StelTextureSP artTexture;
Vec3d artVertex[9]; Vec3d artVertex[9];
//! Define whether art, lines, names and boundary must be drawn //! Define whether art, lines, names and boundary must be drawn
LinearFader artFader, lineFader, nameFader, boundaryFader; LinearFader artFader, lineFader, nameFader, boundaryFader;
std::vector<std::vector<Vec3f> *> isolatedBoundarySegments; std::vector<std::vector<Vec3f> *> isolatedBoundarySegments;
std::vector<std::vector<Vec3f> *> sharedBoundarySegments; std::vector<std::vector<Vec3f> *> sharedBoundarySegments;
//! Currently we only need one color for all constellations, this ma y change at some point //! Currently we only need one color for all constellations, this ma y change at some point
static Vec3f lineColor; static Vec3f lineColor;
static Vec3f labelColor; static Vec3f labelColor;
 End of changes. 10 change blocks. 
11 lines changed or deleted 12 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/