Constellation.hpp   Constellation.hpp 
skipping to change at line 24 skipping to change at line 24
* *
* 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 _CONSTELLATION_HPP_ #ifndef _CONSTELLATION_HPP_
#define _CONSTELLATION_HPP_ #define _CONSTELLATION_HPP_
#include <vector> #include <vector>
#include <boost/intrusive_ptr.hpp>
#include <QString> #include <QString>
#include <QFont>
#include "StelObject.hpp" #include "StelObject.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include "StelFader.hpp" #include "StelFader.hpp"
#include "StelTextureTypes.hpp" #include "StelTextureTypes.hpp"
#include "StelSphereGeometry.hpp"
class StarMgr; class StarMgr;
class StelFont;
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
//! 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;
skipping to change at line 80 skipping to change at line 80
//! @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(StelFont * constfont, const StelPainter& sPainter) con st; void drawName(StelPainter& sPainter) const;
//! Draw the constellation art //! Draw the constellation art
void drawArt(const StelProjectorP& prj, const StelNavigator* nav) co nst; void drawArt(StelPainter& sPainter) const;
//! Draw the constellation boundary //! Draw the constellation boundary
void drawBoundaryOptim(const StelProjectorP& prj) const; void drawBoundaryOptim(StelPainter& sPainter) 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 108 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(const StelPainter& sPainter, const StelNavigator* nav ) const; void drawOptim(StelPainter& sPainter, const StelNavigator* nav, cons t SphericalCap& viewportHalfspace) 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(const StelProjectorP& prj, const StelNavigator* na v) 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);
//! 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 153 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;
StelTextureSP artTexture; StelTextureSP artTexture;
Vec3d artVertex[9]; SphericalTexturedConvexPolygon artPolygon;
//! 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;
static Vec3f boundaryColor; static Vec3f boundaryColor;
 End of changes. 11 change blocks. 
8 lines changed or deleted 9 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/