Nebula.hpp   Nebula.hpp 
skipping to change at line 39 skipping to change at line 39
#include <QString> #include <QString>
class StelPainter; class StelPainter;
class QDataStream; class QDataStream;
// This only draws nebula icons. For the DSO images, see StelSkylayerMgr an d StelSkyImageTile. // This only draws nebula icons. For the DSO images, see StelSkylayerMgr an d StelSkyImageTile.
class Nebula : public StelObject class Nebula : public StelObject
{ {
friend class NebulaMgr; friend class NebulaMgr;
public: public:
enum CatalogGroupFlags
{
CatNGC = 0x00000001, //!< New General Catalogue (NG
C)
CatIC = 0x00000002, //!< Index Catalogue (IC)
CatM = 0x00000004, //!< Messier Catalog (M)
CatC = 0x00000008, //!< Caldwell Catalogue (C)
CatB = 0x00000010, //!< Barnard Catalogue (B)
CatSh2 = 0x00000020, //!< Sharpless Catalogue (Sh 2
)
CatLBN = 0x00000040, //!< Lynds' Catalogue of Brigh
t Nebulae (LBN)
CatLDN = 0x00000080, //!< Lynds' Catalogue of Dark
Nebulae (LDN)
CatRCW = 0x00000100, //!< A catalogue of Hα-emissio
n regions in the southern Milky Way (RCW)
CatVdB = 0x00000200, //!< Van den Bergh Catalogue o
f reflection nebulae (VdB)
CatCr = 0x00000400, //!< Collinder Catalogue (Cr o
r Col)
CatMel = 0x00000800, //!< Melotte Catalogue of Deep
Sky Objects (Mel)
CatPGC = 0x00001000, //!< HYPERLEDA. I. Catalog of
galaxies (PGC)
CatUGC = 0x00002000, //!< The Uppsala General Catal
ogue of Galaxies
CatCed = 0x00004000 //!< Cederblad Catalog of brigh
t diffuse Galactic nebulae (Ced)
};
enum TypeGroupFlags
{
TypeGalaxies = 0x00000001, //!< Galaxies
TypeActiveGalaxies = 0x00000002, //!< Different Active
Galaxies
TypeInteractingGalaxies = 0x00000004, //!< Different Active
Galaxies
TypeStarClusters = 0x00000008, //!< Star Clusters
TypeHydrogenRegions = 0x00000010, //!< Hydrogen Regions
TypeBrightNebulae = 0x00000020, //!< Bright Nebulae
TypeDarkNebulae = 0x00000040, //!< Dark Nebulae
TypePlanetaryNebulae = 0x00000080, //!< Planetary Nebulae
TypeSupernovaRemnants = 0x00000100, //!< Planetary Nebulae
TypeOther = 0x00000200 //!< Other objects
};
typedef QFlags<CatalogGroupFlags> CatalogGroup;
Q_FLAGS(CatalogGroup)
typedef QFlags<TypeGroupFlags> TypeGroup;
Q_FLAGS(TypeGroup)
//! A pre-defined set of specifiers for the catalogs filter
static const CatalogGroupFlags AllCatalogs = (CatalogGroupFlags)(Cat
NGC|CatIC|CatM|CatC|CatB|CatSh2|CatLBN|CatLDN|CatRCW|CatVdB|CatCr|CatMel|Ca
tPGC|CatUGC|CatCed);
static const TypeGroupFlags AllTypes = (TypeGroupFlags)(TypeGalaxies
|TypeActiveGalaxies|TypeInteractingGalaxies|TypeStarClusters|TypeHydrogenRe
gions|TypeBrightNebulae|TypeDarkNebulae|TypePlanetaryNebulae|TypeSupernovaR
emnants|TypeOther);
Nebula(); Nebula();
~Nebula(); ~Nebula();
//! Nebula support the following InfoStringGroup flags: //! Nebula support the following InfoStringGroup flags:
//! - Name //! - Name
//! - CatalogNumber //! - CatalogNumber
//! - Magnitude //! - Magnitude
//! - RaDec //! - RaDec
//! - AltAzi //! - AltAzi
//! - Distance //! - Distance
skipping to change at line 64 skipping to change at line 106
//! @return a QString containing an HMTL encoded description of the Nebula. //! @return a QString containing an HMTL encoded description of the Nebula.
virtual QString getInfoString(const StelCore *core, const InfoString Group& flags) const; virtual QString getInfoString(const StelCore *core, const InfoString Group& flags) const;
virtual QString getType() const {return "Nebula";} virtual QString getType() const {return "Nebula";}
virtual Vec3d getJ2000EquatorialPos(const StelCore*) const {return X YZ;} virtual Vec3d getJ2000EquatorialPos(const StelCore*) const {return X YZ;}
virtual double getCloseViewFov(const StelCore* core = NULL) const; virtual double getCloseViewFov(const StelCore* core = NULL) const;
virtual float getVMagnitude(const StelCore* core) const; virtual float getVMagnitude(const StelCore* core) const;
virtual float getSelectPriority(const StelCore* core) const; virtual float getSelectPriority(const StelCore* core) const;
virtual Vec3f getInfoColor() const; virtual Vec3f getInfoColor() const;
virtual QString getNameI18n() const {return nameI18;} virtual QString getNameI18n() const {return nameI18;}
virtual QString getEnglishName() const {return englishName;} virtual QString getEnglishName() const {return englishName;}
virtual double getAngularSize(const StelCore*) const {return angular Size*0.5;} virtual double getAngularSize(const StelCore*) const;
virtual SphericalRegionP getRegion() const {return pointRegion;} virtual SphericalRegionP getRegion() const {return pointRegion;}
// Methods specific to Nebula // Methods specific to Nebula
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;
//! Get the printable morphological nebula Type.
//! @return the nebula morphological type string.
QString getMorphologicalTypeString() const;
float getSurfaceBrightness(const StelCore* core) const; float getSurfaceBrightness(const StelCore* core) const;
float getSurfaceBrightnessWithExtinction(const StelCore* core) const ; float getSurfaceBrightnessWithExtinction(const StelCore* core) const ;
//! Get the surface area.
//! @return surface area in square degrees.
float getSurfaceArea(void) const;
void setProperName(QString name) { englishName = name; }
private: private:
friend struct DrawNebulaFuncObject; friend struct DrawNebulaFuncObject;
//! @enum NebulaType Nebula types //! @enum NebulaType Nebula types
enum NebulaType enum NebulaType
{ {
NebGx=0, //!< Galaxy NebGx = 0, //!< Galaxy
NebOc=1, //!< Open star cluster NebAGx = 1, //!< Active galaxy
NebGc=2, //!< Globular star cluster, usually in the Milk NebRGx = 2, //!< Radio galaxy
y Way Galaxy NebIGx = 3, //!< Interacting galaxy
NebN=3, //!< Bright emission or reflection nebula NebQSO = 4, //!< Quasar
NebPn=4, //!< Planetary nebula NebCl = 5, //!< Star cluster
NebDn=5, //!< ??? Dark Nebula? Does not exist in cu NebOc = 6, //!< Open star cluster
rrent catalog NebGc = 7, //!< Globular star cluster, usually
NebIg=6, //!< ??? Irregular Galaxy? Does not exist in cu in the Milky Way Galaxy
rrent catalog NebSA = 8, //!< Stellar association
NebCn=7, //!< Cluster associated with nebulosity NebSC = 9, //!< Star cloud
NebUnknown=8,//!< Unknown type, catalog errors, "Unidentifie NebN = 10, //!< A nebula
d Southern Objects" etc. NebPn = 11, //!< Planetary nebula
NebHII=9, //!< HII Region NebDn = 12, //!< Dark Nebula
NebRn=10, //!< Reflection nebula NebRn = 13, //!< Reflection nebula
NebHa=11 //!< H-α emission region NebBn = 14, //!< Bipolar nebula
}; NebEn = 15, //!< Emission nebula
NebCn = 16, //!< Cluster associated with nebulos
//! @enum HIIFormType HII region form types ity
enum HIIFormType NebHII = 17, //!< HII Region
{ NebSNR = 18, //!< Supernova remnant
FormCir=1, //!< circular form NebISM = 19, //!< Interstellar matter
FormEll=2, //!< elliptical form NebEMO = 20, //!< Emission object
FormIrr=3 //!< irregular form NebBLL = 21, //!< BL Lac object
}; NebBLA = 22, //!< Blazar
NebMolCld = 23, //!< Molecular Cloud
//! @enum HIIStructureType HII region structure types NebYSO = 24, //!< Young Stellar Object
enum HIIStructureType NebPossQSO = 25, //!< Possible Quasar
{ NebPossPN = 26, //!< Possible Planetary Nebula
StructureAmo=1, //!< amorphous structure NebPPN = 27, //!< Protoplanetary Nebula
StructureCon=2, //!< conventional structure NebStar = 28, //!< Star
StructureFil=3 //!< filamentary structure NebUnknown = 29 //!< Unknown type, catalog errors, "
}; Unidentified Southern Objects" etc.
//! @enum HIIBrightnessType HII region brightness types
enum HIIBrightnessType
{
Faintest=1,
Moderate=2,
Brightest=3
};
//! @enum HaBrightnessType H-α emission region brightness types
enum HaBrightnessType
{
HaFaint=1,
HaMedium=2,
HaBright=3,
HaVeryBright=4
}; };
//! Translate nebula name using the passed translator //! Translate nebula name using the passed translator
void translateName(const StelTranslator& trans) {nameI18 = trans.qtr anslate(englishName);} void translateName(const StelTranslator& trans) {nameI18 = trans.qtr anslate(englishName);}
bool readNGC(char *record); void readDSO(QDataStream& in);
void readNGC(QDataStream& in);
bool readBarnard(QString record);
bool readSharpless(QString record);
bool readVandenBergh(QString record);
bool readRCW(QString record);
bool readLDN(QString record);
bool readLBN(QString record);
void drawLabel(StelPainter& sPainter, float maxMagLabel); void drawLabel(StelPainter& sPainter, float maxMagLabel);
void drawHints(StelPainter& sPainter, float maxMagHints); void drawHints(StelPainter& sPainter, float maxMagHints);
//! Get the printable HII region form type. bool objectInDisplayedType() const;
QString getHIIFormTypeString() const;
//! Get the printable HII region structure type. //! Get the printable description of morphological nebula type.
QString getHIIStructureTypeString() const; //! @return the nebula morphological type string.
//! Get the printable HII region brightness type. QString getMorphologicalTypeDescription() const;
QString getHIIBrightnessTypeString() const;
//! Get the printable H-α emission region brightness type.
QString getHaBrightnessTypeString() const;
unsigned int DSO_nb;
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
unsigned int C_nb; // Caldwell Catalog number unsigned int C_nb; // Caldwell Catalog number
unsigned int B_nb; // Barnard Catalog number (Dark Nebu lae) unsigned int B_nb; // Barnard Catalog number (Dark Nebu lae)
unsigned int Sh2_nb; // Sharpless Catalog number (Catalog ue of HII Regions (Sharpless, 1959)) unsigned int Sh2_nb; // Sharpless Catalog number (Catalog ue of HII Regions (Sharpless, 1959))
unsigned int VdB_nb; // Van den Bergh Catalog number (Cat alogue of Reflection Nebulae (Van den Bergh, 1966)) unsigned int VdB_nb; // Van den Bergh Catalog number (Cat alogue of Reflection Nebulae (Van den Bergh, 1966))
unsigned int RCW_nb; // RCW Catalog number (H-α emission regions in Southern Milky Way (Rodgers+, 1960)) unsigned int RCW_nb; // RCW Catalog number (H-α emission regions in Southern Milky Way (Rodgers+, 1960))
unsigned int LDN_nb; // LDN Catalog number (Lynds' Catalo gue of Dark Nebulae (Lynds, 1962)) unsigned int LDN_nb; // LDN Catalog number (Lynds' Catalo gue of Dark Nebulae (Lynds, 1962))
unsigned int LBN_nb; // LBN Catalog number (Lynds' Catalo gue of Bright Nebulae (Lynds, 1965)) unsigned int LBN_nb; // LBN Catalog number (Lynds' Catalo gue of Bright Nebulae (Lynds, 1965))
unsigned int Cr_nb; // Collinder Catalog number unsigned int Cr_nb; // Collinder Catalog number
unsigned int Mel_nb; // Melotte Catalog number unsigned int Mel_nb; // Melotte Catalog number
unsigned int PGC_nb; // PGC number (Catalog of galaxies)
unsigned int UGC_nb; // UGC number (The Uppsala General C
atalogue of Galaxies)
QString Ced_nb; // Ced number (Cederblad Catalog of
bright diffuse Galactic nebulae)
QString englishName; // English name QString englishName; // English name
QString nameI18; // Nebula name QString nameI18; // Nebula name
float mag; // Apparent magnitude. For Dark Nebu QString mTypeString; // Morphological type of object (as
lae, opacity is stored here. string)
float angularSize; // Angular size in degree float bMag; // B magnitude
float vMag; // V magnitude. For Dark Nebulae, op
acity is stored here.
float majorAxisSize; // Major axis size in degrees
float minorAxisSize; // Minor axis size in degrees
int orientationAngle; // Orientation angle in degrees
float oDistance; // distance (Mpc for galaxies, kpc f
or other objects)
float oDistanceErr; // Error of distance (Mpc for galaxi
es, kpc for other objects)
float redshift;
float redshiftErr;
float parallax;
float parallaxErr;
Vec3d XYZ; // Cartesian equatorial position (J2 000.0) Vec3d XYZ; // Cartesian equatorial position (J2 000.0)
Vec3d XY; // Store temporary 2D position Vec3d XY; // Store temporary 2D position
NebulaType nType; NebulaType nType;
HIIFormType formType;
HIIStructureType structureType;
HIIBrightnessType brightnessType;
HaBrightnessType rcwBrightnessType;
int brightnessClass;
SphericalRegionP pointRegion; SphericalRegionP pointRegion;
static StelTextureSP texCircle; // The symbolic circle texture static StelTextureSP texCircle; // The symbolic circle texture
static StelTextureSP texGalaxy; // Type 0 static StelTextureSP texGalaxy; // Type 0
static StelTextureSP texOpenCluster; // Type 1 static StelTextureSP texOpenCluster; // Type 1
static StelTextureSP texGlobularCluster; // Type 2 static StelTextureSP texGlobularCluster; // Type 2
static StelTextureSP texPlanetaryNebula; // Type 3 static StelTextureSP texPlanetaryNebula; // Type 3
static StelTextureSP texDiffuseNebula; // Type 4 static StelTextureSP texDiffuseNebula; // Type 4
static StelTextureSP texDarkNebula; // Type 5 static StelTextureSP texDarkNebula; // Type 5
static StelTextureSP texOpenClusterWithNebulosity; // Type 7 static StelTextureSP texOpenClusterWithNebulosity; // Type 7
static float hintsBrightness; static float hintsBrightness;
static Vec3f labelColor, circleColor; static Vec3f labelColor, circleColor, galaxyColor, radioGalaxyColor,
activeGalaxyColor, interactingGalaxyColor,
brightNebulaColor, darkNebulaColor, hydrogenRegionColor
, supernovaRemnantColor, clusterColor;
static float circleScale; // Define the scaling of the hints c ircle static float circleScale; // Define the scaling of the hints c ircle
static bool drawHintProportional; // scale hint with nebula size? static bool drawHintProportional; // scale hint with nebula size?
static bool surfaceBrightnessUsage;
static bool flagUsageTypeFilter;
static CatalogGroup catalogFilters;
static TypeGroup typeFilters;
}; };
Q_DECLARE_OPERATORS_FOR_FLAGS(Nebula::CatalogGroup)
Q_DECLARE_OPERATORS_FOR_FLAGS(Nebula::TypeGroup)
#endif // _NEBULA_HPP_ #endif // _NEBULA_HPP_
 End of changes. 14 change blocks. 
77 lines changed or deleted 144 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/