3
* Copyright (C) 2002 Fabien Chereau
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.
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
#ifndef _STEL_OBJECT_H_
21
#define _STEL_OBJECT_H_
24
#include "projector.h"
25
#include "navigator.h"
26
#include "s_texture.h"
39
STEL_OBJECT_CONSTELLATION,
43
virtual ~StelObject() {;}
44
virtual void update(void) {return;}
45
void draw_pointer(int delta_time, const Projector* prj, const Navigator * nav);
47
//! Write I18n information about the object in wstring.
48
virtual wstring getInfoString(const Navigator * nav) const = 0;
50
//! The returned wstring can typically be used for object labeling in the sky
51
virtual wstring getShortInfoString(const Navigator * nav) const = 0;
53
//! Return object's type
54
virtual STEL_OBJECT_TYPE get_type(void) const = 0;
56
//! Get position in earth equatorial frame
57
virtual Vec3d get_earth_equ_pos(const Navigator *nav) const = 0;
59
//! observer centered J2000 coordinates
60
virtual Vec3d getObsJ2000Pos(const Navigator *nav) const = 0;
62
//! Return object's magnitude
63
virtual float get_mag(const Navigator * nav) const = 0;
65
//! Get object main color, used to display infos
66
virtual Vec3f get_RGB(void) const {return Vec3f(1.,1.,1.);}
68
//! Return the best FOV in degree to use for a close view of the object
69
virtual double get_close_fov(const Navigator * nav) const {return 10.;}
71
//! Return the best FOV in degree to use for a global view of the object satellite system (if there are satellites)
72
virtual double get_satellites_fov(const Navigator * nav) const {return -1.;}
74
static void init_textures(void);
75
static void delete_textures(void);
77
virtual float get_on_screen_size(const Projector* prj, const Navigator * nav = NULL) {return 0;}
79
static int local_time;
80
static s_texture * pointer_star;
81
static s_texture * pointer_planet;
82
static s_texture * pointer_nebula;
83
static s_texture * pointer_telescope;
87
#endif // _STEL_OBJECT_H_