3
* Copyright (C) 2003 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.
21
Class which compute and display the daylight sky color using openGL
22
the sky is computed with the Skylight class.
25
#ifndef _STEL_ATMOSTPHERE_H_
26
#define _STEL_ATMOSTPHERE_H_
30
#include "navigator.h"
31
#include "tone_reproductor.h"
32
#include "skybright.h"
41
virtual ~Atmosphere();
42
void compute_color(double JD, Vec3d sunPos, Vec3d moonPos, float moon_phase, ToneReproductor * eye, Projector* prj,
43
float latitude = 45.f, float altitude = 200.f,
44
float temperature = 15.f, float relative_humidity = 40.f);
45
void draw(Projector* prj, int delta_time);
46
void update(int delta_time) {fader.update(delta_time);}
48
//! Set fade in/out duration in seconds
49
void setFadeDuration(float duration) {fader.set_duration((int)(duration*1000.f));}
50
//! Get fade in/out duration in seconds
51
float getFadeDuration() {return fader.get_duration()/1000.f;}
53
//! Define whether to display atmosphere
54
void setFlagShow(bool b){fader = b;}
55
//! Get whether atmosphere is displayed
56
bool getFlagShow() const {return fader;}
58
float get_intensity(void) {return atm_intensity; } // tells you actual atm intensity due to eclipses + fader
59
float get_fade_intensity(void) {return fader.getInterstate();} // let's you know how far faded in or out the atm is (0-1)
60
float get_world_adaptation_luminance(void) const {return world_adaptation_luminance;}
61
float get_milkyway_adaptation_luminance(void) const {return milkyway_adaptation_luminance;}
66
Vec3f ** tab_sky; // For Atmosphere calculation
67
int startY; // intern variable used to store the Horizon Y screen value
68
float world_adaptation_luminance;
69
float milkyway_adaptation_luminance;
74
#endif // _STEL_ATMOSTPHERE_H_