StelObject.hpp   StelObject.hpp 
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* 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., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _STELOBJECT_HPP_ #ifndef _STELOBJECT_HPP_
#define _STELOBJECT_HPP_ #define _STELOBJECT_HPP_
#include <QFlags>
#include <QString>
#include "VecMath.hpp" #include "VecMath.hpp"
#include "StelObjectType.hpp" #include "StelObjectType.hpp"
#include "StelRegionObject.hpp" #include "StelRegionObject.hpp"
#include <QFlags>
#include <QString>
class StelCore; class StelCore;
//! The base abstract class for sky objects used in Stellarium like Stars, Planets, Constellations etc... //! The base abstract class for sky objects used in Stellarium like Stars, Planets, Constellations etc...
//! Normally you should use StelObjectP instead of StelObject* which have b y default the same behaviour, //! Normally you should use StelObjectP instead of StelObject* which have b y default the same behaviour,
//! but which can be added reference counting if needed. //! but which can be added reference counting if needed.
//! @sa StelObjectP //! @sa StelObjectP
class StelObject : public StelRegionObject class StelObject : public StelRegionObject
{ {
public: public:
//! @enum InfoStringGroupFlags used as named bitfield flags as speci fiers to //! @enum InfoStringGroup used as named bitfield flags as specifiers to
//! filter results of getInfoString. The precise definition of these should //! filter results of getInfoString. The precise definition of these should
//! be documented in the getInfoString documentation for the derived classes //! be documented in the getInfoString documentation for the derived classes
//! for all specifiers which are defined in that derivative. //! for all specifiers which are defined in that derivative.
//! Use InfoStringGroup instead. //! Use InfoStringGroup instead.
enum InfoStringGroupFlags enum InfoStringGroupFlags
{ {
Name = 0x00000001, //!< An object's name Name = 0x00000001, //!< An object's name
CatalogNumber = 0x00000002, //!< Catalog numbers CatalogNumber = 0x00000002, //!< Catalog numbers
Magnitude = 0x00000004, //!< Magnitude related data Magnitude = 0x00000004, //!< Magnitude related
RaDecJ2000 = 0x00000008, //!< The equatorial position (J2 data
000 ref) RaDecJ2000 = 0x00000008, //!< The equatorial po
RaDecOfDate = 0x00000010, //!< The equatorial position (of sition (J2000 ref)
date) RaDecOfDate = 0x00000010, //!< The equatorial po
AltAzi = 0x00000020, //!< The position (Altitude/Azim sition (of date)
uth) AltAzi = 0x00000020, //!< The position (Alt
Distance = 0x00000040, //!< Info about an object's dist itude/Azimuth)
ance Distance = 0x00000040, //!< Info about an obj
Size = 0x00000080, //!< Info about an object's size ect's distance
Extra1 = 0x00000100, //!< Derived class-specific extr Size = 0x00000080, //!< Info about an obj
a fields ect's size
Extra2 = 0x00000200, //!< Derived class-specific extr Extra = 0x00000100, //!< Derived class-spe
a fields cific extra fields
Extra3 = 0x00000400, //!< Derived class-specific extr HourAngle = 0x00000200, //!< The hour angle +
a fields DE (of date)
PlainText = 0x00000800, //!< Strip HTML tags from output AbsoluteMagnitude = 0x00000400, //!< The absolute magn
HourAngle = 0x00001000, //!< The hour angle + DE (of da itude
te) GalacticCoord = 0x00000800, //!< The galactic posi
AbsoluteMagnitude = 0x00002000, //!< The absolute magnitude tion
GalCoordJ2000 = 0x00004000 //!< The galactic position ( ObjectType = 0x00001000, //!< The type of the o
J2000 ref) GZ: HEY STOP! GalCoords are DEFINED in B1950 coordinates! What w bject (star, planet, etc.)
e have here is a transformation matrix preconfigured to do precession J2000 EclTopocentricCoord = 0x00002000, //!< The ecliptic topo
->B1950 and Equ.B1950->Gal. But "GalCoord for J2000" does not make sense. centric position
PlainText = 0x00004000 //!< Strip HTML tags f
rom output
}; };
typedef QFlags<InfoStringGroupFlags> InfoStringGroup; typedef QFlags<InfoStringGroupFlags> InfoStringGroup;
Q_FLAGS(InfoStringGroup) Q_FLAGS(InfoStringGroup)
//! A pre-defined set of specifiers for the getInfoString flags argu ment to getInfoString //! A pre-defined set of specifiers for the getInfoString flags argu ment to getInfoString
static const InfoStringGroupFlags AllInfo = (InfoStringGroupFlags)(N ame|CatalogNumber|Magnitude|RaDecJ2000|RaDecOfDate|AltAzi|Distance|Size|Ext ra1|Extra2|Extra3|HourAngle|AbsoluteMagnitude|GalCoordJ2000); static const InfoStringGroupFlags AllInfo = (InfoStringGroupFlags)(N ame|CatalogNumber|Magnitude|RaDecJ2000|RaDecOfDate|AltAzi|Distance|Size|Ext ra|HourAngle|AbsoluteMagnitude|GalacticCoord|ObjectType|EclTopocentricCoord );
//! A pre-defined set of specifiers for the getInfoString flags argu ment to getInfoString //! A pre-defined set of specifiers for the getInfoString flags argu ment to getInfoString
static const InfoStringGroupFlags ShortInfo = (InfoStringGroupFlags) (Name|CatalogNumber|Magnitude|RaDecJ2000); static const InfoStringGroupFlags ShortInfo = (InfoStringGroupFlags) (Name|CatalogNumber|Magnitude|RaDecJ2000);
virtual ~StelObject() {} virtual ~StelObject() {}
//! Default implementation of the getRegion method. //! Default implementation of the getRegion method.
//! Return the spatial region of the object. //! Return the spatial region of the object.
virtual SphericalRegionP getRegion() const {return SphericalRegionP( new SphericalPoint(getJ2000EquatorialPos(NULL)));} virtual SphericalRegionP getRegion() const {return SphericalRegionP( new SphericalPoint(getJ2000EquatorialPos(NULL)));}
//! Default implementation of the getPointInRegion method.
//! Return the J2000 Equatorial Position of the object.
virtual Vec3d getPointInRegion() const {return getJ2000EquatorialPos
(NULL);}
//! Write I18n information about the object in QString. //! Write I18n information about the object in QString.
//! @param core the StelCore object to use //! @param core the StelCore object to use
//! @param flags a set of InfoStringGroup flags which are used to //! @param flags a set of InfoStringGroup flags which are used to
//! filter the return value - including specified types of informati on //! filter the return value - including specified types of informati on
//! and altering the output format. //! and altering the output format.
//! @return an HTML string containing information about the StelObje ct. //! @return an HTML string containing information about the StelObje ct.
virtual QString getInfoString(const StelCore *core, const InfoString Group& flags=StelObject::AllInfo) const = 0; virtual QString getInfoString(const StelCore *core, const InfoString Group& flags=StelObject::AllInfo) const = 0;
//! Return object's type. It should be the name of the class. //! Return object's type. It should be the name of the class.
virtual QString getType() const = 0; virtual QString getType() const = 0;
skipping to change at line 100 skipping to change at line 105
virtual QString getNameI18n() const = 0; virtual QString getNameI18n() const = 0;
//! Get observer-centered equatorial coordinates at equinox J2000 //! Get observer-centered equatorial coordinates at equinox J2000
virtual Vec3d getJ2000EquatorialPos(const StelCore* core) const = 0; virtual Vec3d getJ2000EquatorialPos(const StelCore* core) const = 0;
//! Get observer-centered equatorial coordinate at the current equin ox //! Get observer-centered equatorial coordinate at the current equin ox
//! The frame has it's Z axis at the planet's current rotation axis //! The frame has it's Z axis at the planet's current rotation axis
//! At time 2000-01-01 this frame is almost the same as J2000, but O NLY if the observer is on earth //! At time 2000-01-01 this frame is almost the same as J2000, but O NLY if the observer is on earth
Vec3d getEquinoxEquatorialPos(const StelCore* core) const; Vec3d getEquinoxEquatorialPos(const StelCore* core) const;
//! Get observer-centered galactic coordinates at equinox J2000 //! Get observer-centered galactic coordinates
Vec3d getJ2000GalacticPos(const StelCore* core) const; Vec3d getGalacticPos(const StelCore* core) const;
//! Get observer-centered hour angle + declination (at current equin ox) //! Get observer-centered hour angle + declination (at current equin ox)
//! It is the geometric position, i.e. without taking refraction eff ect into account. //! It is the geometric position, i.e. without taking refraction eff ect into account.
//! The frame has its Z axis at the planet's current rotation axis //! The frame has its Z axis at the planet's current rotation axis
Vec3d getSideralPosGeometric(const StelCore* core) const; Vec3d getSiderealPosGeometric(const StelCore* core) const;
//! Get observer-centered hour angle + declination (at current equin ox) //! Get observer-centered hour angle + declination (at current equin ox)
//! It is the apparent position, i.e. taking the refraction effect i nto account. //! It is the apparent position, i.e. taking the refraction effect i nto account.
//! The frame has its Z axis at the planet's current rotation axis //! The frame has its Z axis at the planet's current rotation axis
Vec3d getSideralPosApparent(const StelCore* core) const; Vec3d getSiderealPosApparent(const StelCore* core) const;
//! Get observer-centered alt/az position //! Get observer-centered alt/az position
//! It is the geometric position, i.e. without taking refraction eff ect into account. //! It is the geometric position, i.e. without taking refraction eff ect into account.
//! The frame has it's Z axis at the zenith //! The frame has it's Z axis at the zenith
Vec3d getAltAzPosGeometric(const StelCore* core) const; Vec3d getAltAzPosGeometric(const StelCore* core) const;
//! Get observer-centered alt/az position //! Get observer-centered alt/az position
//! It is the apparent position, i.e. taking the refraction effect i nto account. //! It is the apparent position, i.e. taking the refraction effect i nto account.
//! The frame has it's Z axis at the zenith //! The frame has it's Z axis at the zenith
Vec3d getAltAzPosApparent(const StelCore* core) const; Vec3d getAltAzPosApparent(const StelCore* core) const;
//! Get observer-centered alt/az position //! Get observer-centered alt/az position
//! It is the automatic position, i.e. taking the refraction effect into account if atmosphere is on. //! It is the automatic position, i.e. taking the refraction effect into account if atmosphere is on.
//! The frame has it's Z axis at the zenith //! The frame has it's Z axis at the zenith
Vec3d getAltAzPosAuto(const StelCore* core) const; Vec3d getAltAzPosAuto(const StelCore* core) const;
//! Return object's apparent V magnitude as seen from observer //! Return object's apparent V magnitude as seen from observer, with
virtual float getVMagnitude(const StelCore* core, bool withExtinctio out including extinction.
n=false) const; virtual float getVMagnitude(const StelCore* core) const;
//! Return object's apparent V magnitude as seen from observer inclu
ding extinction.
//! GZ 2014-01-02: Extinction obviously only if atmosphere=on.
float getVMagnitudeWithExtinction(const StelCore* core) const;
//! Return a priority value which is used to discriminate objects by priority //! Return a priority value which is used to discriminate objects by priority
//! As for magnitudes, the lower is the higher priority //! As for magnitudes, the lower is the higher priority
virtual float getSelectPriority(const StelCore*) const {return 99;} virtual float getSelectPriority(const StelCore*) const;
//! Get a color used to display info about the object //! Get a color used to display info about the object
virtual Vec3f getInfoColor() const {return Vec3f(1,1,1);} virtual Vec3f getInfoColor() const {return Vec3f(1,1,1);}
//! Return the best FOV in degree to use for a close view of the obj ect //! Return the best FOV in degree to use for a close view of the obj ect
virtual double getCloseViewFov(const StelCore*) const {return 10.;} virtual double getCloseViewFov(const StelCore*) const {return 10.;}
//! Return the best FOV in degree to use for a global view of the ob ject satellite system (if there are satellites) //! Return the best FOV in degree to use for a global view of the ob ject satellite system (if there are satellites)
virtual double getSatellitesFov(const StelCore*) const {return -1.;} virtual double getSatellitesFov(const StelCore*) const {return -1.;}
virtual double getParentSatellitesFov(const StelCore*) const {return -1.;} virtual double getParentSatellitesFov(const StelCore*) const {return -1.;}
 End of changes. 11 change blocks. 
38 lines changed or deleted 51 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/