Stellarium 0.12.4
Main Page
Namespaces
Classes
Coding Style
Scripting
Plugins
Renderer
File Structure
File List
File Members
core
StelObject.hpp
1
/*
2
* Stellarium
3
* Copyright (C) 2002 Fabien Chereau
4
*
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18
*/
19
20
#ifndef _STELOBJECT_HPP_
21
#define _STELOBJECT_HPP_
22
23
#include <QFlags>
24
#include <QString>
25
#include "VecMath.hpp"
26
#include "
StelObjectType.hpp
"
27
#include "StelRegionObject.hpp"
28
29
class
StelCore
;
30
35
class
StelObject
:
public
StelRegionObject
36
{
37
public
:
43
enum
InfoStringGroupFlags
44
{
45
Name
= 0x00000001,
46
CatalogNumber
= 0x00000002,
47
Magnitude
= 0x00000004,
48
RaDecJ2000
= 0x00000008,
49
RaDecOfDate
= 0x00000010,
50
AltAzi
= 0x00000020,
51
Distance
= 0x00000040,
52
Size
= 0x00000080,
53
Extra1
= 0x00000100,
54
Extra2
= 0x00000200,
55
Extra3
= 0x00000400,
56
PlainText
= 0x00000800,
57
HourAngle
= 0x00001000,
58
AbsoluteMagnitude
= 0x00002000,
59
GalCoordJ2000
= 0x00004000
60
};
61
typedef
QFlags<InfoStringGroupFlags> InfoStringGroup;
62
Q_FLAGS
(InfoStringGroup)
63
64
65
static const
InfoStringGroupFlags
AllInfo = (
InfoStringGroupFlags
)(
Name
|
CatalogNumber
|
Magnitude
|
RaDecJ2000
|
RaDecOfDate
|
AltAzi
|
Distance
|
Size
|
Extra1
|
Extra2
|
Extra3
|
HourAngle
|
AbsoluteMagnitude
|
GalCoordJ2000
);
67
static const
InfoStringGroupFlags
ShortInfo
= (
InfoStringGroupFlags
)(
Name
|
CatalogNumber
|
Magnitude
|
RaDecJ2000
);
68
69
virtual ~
StelObject
() {}
70
73
virtual
SphericalRegionP
getRegion
()
const
{
return
SphericalRegionP
(
new
SphericalPoint
(
getJ2000EquatorialPos
(NULL)));}
74
81
virtual
QString
getInfoString
(
const
StelCore
*core,
const
InfoStringGroup& flags=StelObject::AllInfo)
const
= 0;
82
84
virtual
QString
getType
()
const
= 0;
85
87
virtual
QString
getEnglishName
()
const
= 0;
88
90
virtual
QString
getNameI18n
()
const
= 0;
91
93
virtual
Vec3d
getJ2000EquatorialPos
(
const
StelCore
* core)
const
= 0;
94
98
Vec3d
getEquinoxEquatorialPos
(
const
StelCore
* core)
const
;
99
101
Vec3d
getJ2000GalacticPos
(
const
StelCore
* core)
const
;
102
106
Vec3d
getSideralPosGeometric
(
const
StelCore
* core)
const
;
107
111
Vec3d
getSideralPosApparent
(
const
StelCore
* core)
const
;
112
116
Vec3d
getAltAzPosGeometric
(
const
StelCore
* core)
const
;
117
121
Vec3d
getAltAzPosApparent
(
const
StelCore
* core)
const
;
122
126
Vec3d
getAltAzPosAuto
(
const
StelCore
* core)
const
;
127
129
virtual
float
getVMagnitude
(
const
StelCore
* core,
bool
withExtinction=
false
)
const
;
130
133
virtual
float
getSelectPriority
(
const
StelCore
*)
const
{
return
99;}
134
136
virtual
Vec3f
getInfoColor
()
const
{
return
Vec3f
(1,1,1);}
137
139
virtual
double
getCloseViewFov
(
const
StelCore
*)
const
{
return
10.;}
140
142
virtual
double
getSatellitesFov
(
const
StelCore
*)
const
{
return
-1.;}
143
virtual
double
getParentSatellitesFov(
const
StelCore
*)
const
{
return
-1.;}
144
148
virtual
double
getAngularSize
(
const
StelCore
* core)
const
= 0;
149
150
protected
:
151
153
QString
getPositionInfoString
(
const
StelCore
*core,
const
InfoStringGroup& flags)
const
;
154
156
void
postProcessInfoString
(QString& str,
const
InfoStringGroup& flags)
const
;
157
};
158
159
Q_DECLARE_OPERATORS_FOR_FLAGS(StelObject::InfoStringGroup)
160
161
#endif // _STELOBJECT_HPP_
Generated on Wed Sep 25 2013 22:30:30 for Stellarium by
1.8.3.1