Stellarium  HEAD
Public Member Functions
AtmospherePreetham Class Reference

Compute and display the daylight sky color using OpenGL. More...

#include <AtmospherePreetham.hpp>

Public Member Functions

 AtmospherePreetham (Skylight &sky)
 
void computeColor (StelCore *core, double JD, const Planet &currentPlanet, const Planet &sun, const Planet *moon, const StelLocation &location, float temperature, float relativeHumidity, float extinctionCoefficient, bool noScatter) override
 Compute sky brightness values and average luminance. More...
 
void draw (StelCore *core) override
 
void update (double deltaTime)
 
bool isLoading () const override
 
bool isReadyToRender () const override
 
LoadingStatus stepDataLoading () override
 
- Public Member Functions inherited from Atmosphere
void update (double deltaTime)
 
void setFadeDuration (float duration)
 Set fade in/out duration in seconds.
 
float getFadeDuration () const
 Get fade in/out duration in seconds.
 
void setFlagShow (bool b)
 Define whether to display atmosphere.
 
bool getFlagShow () const
 Get whether atmosphere is displayed.
 
float getRealDisplayIntensityFactor () const
 Get the actual atmosphere intensity due to eclipses + fader. More...
 
float getFadeIntensity () const
 
float getAverageLuminance () const
 Get the average luminance of the atmosphere in cd/m2 If atmosphere is off, the luminance equals the background starlight (0.001cd/m2). More...
 
void setAverageLuminance (float overrideLum)
 override computable luminance. More...
 
void setLightPollutionLuminance (float f)
 Set the light pollution luminance in cd/m^2.
 
float getLightPollutionLuminance () const
 Get the light pollution luminance in cd/m^2.
 

Additional Inherited Members

- Protected Attributes inherited from Atmosphere
float averageLuminance = 0
 The average luminance of the atmosphere in cd/m2.
 
bool overrideAverageLuminance = false
 
float eclipseFactor = 1
 
LinearFader fader
 
float lightPollutionLuminance = 0
 

Detailed Description

Compute and display the daylight sky color using OpenGL.

The sky brightness is computed with the SkyBright class, the color with the SkyLight. Don't use this class directly but use it through the LandscapeMgr.

Member Function Documentation

◆ computeColor()

void AtmospherePreetham::computeColor ( StelCore core,
double  JD,
const Planet currentPlanet,
const Planet sun,
const Planet moon,
const StelLocation location,
float  temperature,
float  relativeHumidity,
float  extinctionCoefficient,
bool  noScatter 
)
overridevirtual

Compute sky brightness values and average luminance.

Parameters
noScattertrue to suppress the actual sky brightness modelling. This will keep refraction/extinction working for didactic reasons.

Implements Atmosphere.