Nebula.hpp   Nebula.hpp 
skipping to change at line 27 skipping to change at line 27
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _NEBULA_HPP_ #ifndef _NEBULA_HPP_
#define _NEBULA_HPP_ #define _NEBULA_HPP_
#include <QString> #include <QString>
#include "StelObject.hpp" #include "StelObject.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelTextureTypes.hpp" #include "StelProjectorType.hpp"
class StelPainter;
class QDataStream; class QDataStream;
class Nebula : public StelObject class Nebula : public StelObject
{ {
friend class NebulaMgr; friend class NebulaMgr;
public: public:
Nebula(); Nebula();
~Nebula(); ~Nebula();
//! Nebula support the following InfoStringGroup flags: //! Nebula support the following InfoStringGroup flags:
skipping to change at line 75 skipping to change at line 74
void setLabelColor(const Vec3f& v) {labelColor = v;} void setLabelColor(const Vec3f& v) {labelColor = v;}
void setCircleColor(const Vec3f& v) {circleColor = v;} void setCircleColor(const Vec3f& v) {circleColor = v;}
//! Get the printable nebula Type. //! Get the printable nebula Type.
//! @return the nebula type code. //! @return the nebula type code.
QString getTypeString() const; QString getTypeString() const;
private: private:
friend struct DrawNebulaFuncObject; friend struct DrawNebulaFuncObject;
//! Textures used to draw nebula hints.
struct NebulaHintTextures
{
//! The symbolic circle texture.
class StelTextureNew* texCircle;
//! The open cluster marker texture.
class StelTextureNew* texOpenCluster;
//! The globular cluster marker texture.
class StelTextureNew* texGlobularCluster;
//! The planetary nebula marker texture.
class StelTextureNew* texPlanetaryNebula;
//! Are we initialized yet?
bool initialized;
//! Default constructor - construct uninitialized NebulaHint
Textures.
NebulaHintTextures(): initialized(false){}
//! Destructor - frees resources if initialized.
~NebulaHintTextures();
//! Lazily initialize the data, using given renderer to crea
te textures/shader.
void lazyInit(class StelRenderer* renderer);
};
//! @enum NebulaType Nebula types //! @enum NebulaType Nebula types
enum NebulaType enum NebulaType
{ {
NebGx=0, //!< Galaxy NebGx=0, //!< Galaxy
NebOc=1, //!< Open star cluster NebOc=1, //!< Open star cluster
NebGc=2, //!< Globular star cluster, usually in the Milk y Way Galaxy NebGc=2, //!< Globular star cluster, usually in the Milk y Way Galaxy
NebN=3, //!< Bright emission or reflection nebula NebN=3, //!< Bright emission or reflection nebula
NebPn=4, //!< Planetary nebula NebPn=4, //!< Planetary nebula
NebDn=5, //!< ??? NebDn=5, //!< ???
NebIg=6, //!< ??? NebIg=6, //!< ???
NebCn=7, //!< Cluster associated with nebulosity NebCn=7, //!< Cluster associated with nebulosity
NebUnknown=8 //!< Unknown type NebUnknown=8 //!< Unknown type
}; };
//! Translate nebula name using the passed translator //! Translate nebula name using the passed translator
void translateName(StelTranslator& trans) {nameI18 = trans.qtranslat e(englishName);} void translateName(StelTranslator& trans) {nameI18 = trans.qtranslat e(englishName);}
bool readNGC(char *record); bool readNGC(char *record);
void readNGC(QDataStream& in); void readNGC(QDataStream& in);
void drawLabel(StelPainter& sPainter, float maxMagLabel); void drawHints(StelRenderer* renderer, float maxMagHints, NebulaHint
void drawHints(StelPainter& sPainter, float maxMagHints); Textures& hintTextures);
void drawLabel(StelRenderer* renderer, StelProjectorP projector, flo
at maxMagLabel);
unsigned int M_nb; // Messier Catalog number unsigned int M_nb; // Messier Catalog number
unsigned int NGC_nb; // New General Catalog number unsigned int NGC_nb; // New General Catalog number
unsigned int IC_nb; // Index Catalog number unsigned int IC_nb; // Index Catalog number
QString englishName; // English name QString englishName; // English name
QString nameI18; // Nebula name QString nameI18; // Nebula name
float mag; // Apparent magnitude float mag; // Apparent magnitude
float angularSize; // Angular size in degree float angularSize; // Angular size in degree
Vec3d XYZ; // Cartesian equatorial position Vec3d XYZ; // Cartesian equatorial position
Vec3d XY; // Store temporary 2D position Vec3d XY; // Store temporary 2D position
NebulaType nType; NebulaType nType;
SphericalRegionP pointRegion; SphericalRegionP pointRegion;
static StelTextureSP texCircle; // The symbolic circle texture
static StelTextureSP texOpenCluster;
static StelTextureSP texGlobularCluster;
static StelTextureSP texPlanetNebula;
static float hintsBrightness; static float hintsBrightness;
static Vec3f labelColor, circleColor; static Vec3f labelColor, circleColor;
static float circleScale; // Define the scaling of the hints c ircle static float circleScale; // Define the scaling of the hints c ircle
}; };
#endif // _NEBULA_HPP_ #endif // _NEBULA_HPP_
 End of changes. 5 change blocks. 
8 lines changed or deleted 29 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/