21 #ifndef _ATMOSTPHERE_HPP_
22 #define _ATMOSTPHERE_HPP_
24 #include "Skylight.hpp"
25 #include "VecMath.hpp"
27 #include "Skybright.hpp"
28 #include "StelFader.hpp"
30 #include <QOpenGLBuffer>
45 void computeColor(
double JD,
Vec3d _sunPos,
Vec3d moonPos,
float moonPhase,
StelCore* core,
46 float latitude = 45.f,
float altitude = 200.f,
47 float temperature = 15.f,
float relativeHumidity = 40.f);
49 void update(
double deltaTime) {fader.update((
int)(deltaTime*1000));}
66 float getFadeIntensity()
const {
return fader.getInterstate();}
83 int skyResolutionY,skyResolutionX;
86 QOpenGLBuffer posGridBuffer;
87 QOpenGLBuffer indicesBuffer;
89 QOpenGLBuffer colorGridBuffer;
92 float averageLuminance;
95 float lightPollutionLuminance;
98 class QOpenGLShaderProgram* atmoShaderProgram;
100 int alphaWaOverAlphaDa;
102 int term2TimesOneOverMaxdLpOneOverGamma;
105 int term_x, Ax, Bx, Cx, Dx, Ex;
106 int term_y, Ay, By, Cy, Dy, Ey;
107 int projectionMatrix;
110 } shaderAttribLocations;
113 #endif // _ATMOSTPHERE_HPP_
void setFlagShow(bool b)
Define whether to display atmosphere.
float getRealDisplayIntensityFactor() const
Get the actual atmosphere intensity due to eclipses + fader.
Implementation of StelFader which implements a linear transition.
Compute and display the daylight sky color using openGL.
bool getFlagShow() const
Get whether atmosphere is displayed.
void setLightPollutionLuminance(float f)
Set the light pollution luminance in cd/m^2.
Main class for Stellarium core processing.
A templatized 2d vector compatible with openGL.
Converts tones in function of the eye adaptation to luminance.
float getLightPollutionLuminance() const
Get the light pollution luminance in cd/m^2.
float getFadeDuration()
Get fade in/out duration in seconds.
Provide the main interface to all operations of projecting coordinates from sky to screen...
This class makes use of the 1998 sky brightness model by Bradley Schaefer.
void setFadeDuration(float duration)
Set fade in/out duration in seconds.
float getAverageLuminance() const
Get the average luminance of the atmosphere in cd/m2 If atmosphere is off, the luminance includes the...