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.
25
#include "stellarium.h"
27
#include "projector.h"
28
#include "navigator.h"
29
#include "tone_reproductor.h"
31
#include "translator.h"
33
// Class which manages a grid to display in the sky
42
// Create and precompute positions of a SkyGrid
43
SkyGrid(SKY_GRID_TYPE grid_type = EQUATORIAL, unsigned int _nb_meridian = 24, unsigned int _nb_parallel = 17,
44
double _radius = 1., unsigned int _nb_alt_segment = 18, unsigned int _nb_azi_segment = 50);
46
void draw(const Projector* prj) const;
47
void set_font(float font_size, const string& font_name);
48
void setColor(const Vec3f& c) {color = c;}
49
const Vec3f& getColor() {return color;}
50
void update(int delta_time) {fader.update(delta_time);}
51
void set_fade_duration(float duration) {fader.set_duration((int)(duration*1000.f));}
52
void setFlagshow(bool b){fader = b;}
53
bool getFlagshow(void) const {return fader;}
54
void set_top_transparancy(bool b) { transparent_top= b; }
56
unsigned int nb_meridian;
57
unsigned int nb_parallel;
59
unsigned int nb_alt_segment;
60
unsigned int nb_azi_segment;
65
bool (Projector::*proj_func)(const Vec3d&, Vec3d&) const;
72
// Class which manages a line to display around the sky like the ecliptic line
83
// Create and precompute positions of a SkyGrid
84
SkyLine(SKY_LINE_TYPE _line_type = EQUATOR, double _radius = 1., unsigned int _nb_segment = 48);
86
void draw(const Projector* prj) const;
87
void setColor(const Vec3f& c) {color = c;}
88
const Vec3f& getColor() {return color;}
89
void update(int delta_time) {fader.update(delta_time);}
90
void set_fade_duration(float duration) {fader.set_duration((int)(duration*1000.f));}
91
void setFlagshow(bool b){fader = b;}
92
bool getFlagshow(void) const {return fader;}
93
void set_font(float font_size, const string& font_name);
97
unsigned int nb_segment;
98
SKY_LINE_TYPE line_type;
101
bool (Projector::*proj_func)(const Vec3d&, Vec3d&) const;
106
// Class which manages the cardinal points displaying
110
Cardinals(float _radius = 1.);
111
virtual ~Cardinals();
112
void draw(const Projector* prj, double latitude, bool gravityON = false) const;
113
void setColor(const Vec3f& c) {color = c;}
114
Vec3f get_color() {return color;}
115
void set_font(float font_size, const string& font_name);
116
void translateLabels(Translator& trans); // for i18n
117
void update(int delta_time) {fader.update(delta_time);}
118
void set_fade_duration(float duration) {fader.set_duration((int)(duration*1000.f));}
119
void setFlagShow(bool b){fader = b;}
120
bool getFlagShow(void) const {return fader;}
126
wstring sNorth, sSouth, sEast, sWest;
130
// Class which manages the displaying of the Milky Way
134
MilkyWay(float _radius = 1.);
136
void draw(ToneReproductor * eye, const Projector* prj, const Navigator* nav) const;
137
void update(int delta_time) {fader.update(delta_time);}
138
void set_intensity(float _intensity);
139
float get_intensity() { return intensity; };
140
void set_texture(const string& tex_file, bool blend = false);
141
void setColor(const Vec3f& c) { color=c;}
142
void draw_chart(ToneReproductor * eye, const Projector* prj, const Navigator* nav);
143
void setFlagShow(bool b){fader = b;}
144
bool getFlagShow(void) const {return fader;}
151
float tex_avg_luminance;
155
// Class which manages the displaying of the Milky Way
159
// Draw a point... (used for tests)
160
static void drawPoint(float X,float Y,float Z);