Constellation.hpp   Constellation.hpp 
skipping to change at line 42 skipping to change at line 42
#include <vector> #include <vector>
#include <QString> #include <QString>
#include <QFont> #include <QFont>
class StarMgr; class StarMgr;
class StelPainter; 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
//! @var abbreviation and Hipparcos catalogue numbers (taken from @file: co //! abbreviation and Hipparcos catalogue numbers (taken from file: constell
nstellationship.fab), ationship.fab),
//! another entry in @file constellation_names.eng.fab with the defining ab //! another entry in file constellation_names.eng.fab with the defining abb
breviated name, reviated name,
//! @var nativeName, and translatable @var englishName (translation goes in //! nativeName, and translatable englishName (translation goes into nameI18
to @var nameI18), ),
//! boundary shape from @file constellations_boundaries.dat and an (optiona //! boundary shape from file constellations_boundaries.dat and an (optional
l) artistic pictorial representation. ) artistic pictorial representation.
//! GZ NEW: The @var nativeName should be accessible in a GUI option, so th //! GZ NEW: The nativeName should be accessible in a GUI option, so that e.
at e.g. original names as written in a g. original names as written in a
//! concrete book where a skyculture has been taken from can be assured eve n when translation is available. //! concrete book where a skyculture has been taken from can be assured eve n when translation is available.
//! TODO: There should be a distinction between constellations and asterism s, which are "inofficial" figures within a sky culture. //! TODO: There should be a distinction between constellations and asterism s, which are "inofficial" figures within a sky culture.
//! For example, Western sky culture has a "Big Dipper", "Coathanger", etc. These would be nice to see, but in different style. //! For example, Western sky culture has a "Big Dipper", "Coathanger", etc. These would be nice to see, but in different style.
class Constellation : public StelObject class Constellation : public StelObject
{ {
friend class ConstellationMgr; friend class ConstellationMgr;
private: private:
Constellation(); Constellation();
~Constellation(); ~Constellation();
// StelObject method to override // StelObject method to override
//! Get a string with data about the Constellation. //! Get a string with data about the Constellation.
//! Constellations support the following InfoStringGroup flags: //! Constellations support the following InfoStringGroup flags:
//! - Name //! - Name
//! @param core the StelCore object //! @param core the StelCore object
//! @param flags a set of InfoStringGroup items to include in the re turn value. //! @param flags a set of InfoStringGroup items to include in the re turn value.
//! @return a QString a description of the constellation. //! @return a QString a description of the constellation.
virtual QString getInfoString(const StelCore*, const InfoStringGroup virtual QString getInfoString(const StelCore*, const InfoStringGroup
& flags) const & flags) const;
{
if (flags&Name) return getNameI18n() + "(" + getShortName()
+ ")";
else return "";
}
//! Get the module/object type string. //! Get the module/object type string.
//! @return "Constellation" //! @return "Constellation"
virtual QString getType() const {return "Constellation";} virtual QString getType() const {return "Constellation";}
//! observer centered J2000 coordinates. //! observer centered J2000 coordinates.
virtual Vec3d getJ2000EquatorialPos(const StelCore*) const {return X YZname;} virtual Vec3d getJ2000EquatorialPos(const StelCore*) const {return X YZname;}
virtual double getAngularSize(const StelCore*) const {Q_ASSERT(0); r eturn 0;} // TODO virtual double getAngularSize(const StelCore*) const {Q_ASSERT(0); r eturn 0;} // TODO
skipping to change at line 110 skipping to change at line 106
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
//! a pointer to the one with the brightest apparent magnitude. //! a pointer to the one with the brightest apparent magnitude.
//! @return a pointer to the brightest star //! @return a pointer to the brightest star
StelObjectP getBrightestStarInConstellation(void) const; StelObjectP getBrightestStarInConstellation(void) const;
//! Get the translated name for the Constellation. //! Get the translated name for the Constellation.
QString getNameI18n() const {return nameI18;} QString getNameI18n() const {return nameI18;}
//! Get the English name for the Constellation (returns the abbrevia //! Get the English name for the Constellation.
tion). QString getEnglishName() const {return englishName;}
QString getEnglishName() 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() const {return abbreviation;} QString getShortName() 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 thro ugh //! This method uses the coords of the stars (optimized for use thro ugh
//! the class ConstellationMgr only). //! the class ConstellationMgr only).
void drawOptim(StelPainter& sPainter, const StelCore* core, const Sp hericalCap& viewportHalfspace) const; void drawOptim(StelPainter& sPainter, const StelCore* core, const Sp hericalCap& viewportHalfspace) const;
//! Draw the art texture, optimized function to be called through a constellation manager only. //! Draw the art texture, optimized function to be called through a constellation manager only.
void drawArtOptim(StelPainter& sPainter, const SphericalRegion& regi on) const; void drawArtOptim(StelPainter& sPainter, const SphericalRegion& regi on) 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);
skipping to change at line 191 skipping to change at line 187
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;
static Vec3f boundaryColor; static Vec3f boundaryColor;
static bool singleSelected; static bool singleSelected;
static bool seasonalRuleEnabled; static bool seasonalRuleEnabled;
// set by ConstellationMgr to fade out art on small FOV values
// see LP:#1294483
static float artIntensityFovScale;
}; };
#endif // _CONSTELLATION_HPP_ #endif // _CONSTELLATION_HPP_
 End of changes. 4 change blocks. 
20 lines changed or deleted 17 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/