Stellarium  24.4
Data Structures | Public Member Functions | Protected Attributes
Atmosphere Class Referenceabstract

Data Structures

struct  InitFailure
 
struct  LoadingStatus
 

Public Member Functions

virtual 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)=0
 Compute sky brightness values and average luminance. More...
 
virtual void draw (StelCore *core)=0
 
virtual bool isLoading () const =0
 
virtual bool isReadyToRender () const =0
 
virtual LoadingStatus stepDataLoading ()=0
 
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.
 

Protected Attributes

float averageLuminance = 0
 The average luminance of the atmosphere in cd/m2.
 
bool overrideAverageLuminance = false
 
float eclipseFactor = 1
 
LinearFader fader
 
float lightPollutionLuminance = 0
 

Data Structure Documentation

◆ Atmosphere::LoadingStatus

struct Atmosphere::LoadingStatus
Data Fields
int stepsDone
int stepsToDo

Member Function Documentation

◆ computeColor()

virtual void Atmosphere::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 
)
pure virtual

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.

Implemented in AtmosphereShowMySky, and AtmospherePreetham.

◆ getAverageLuminance()

float Atmosphere::getAverageLuminance ( ) const
inline

Get the average luminance of the atmosphere in cd/m2 If atmosphere is off, the luminance equals the background starlight (0.001cd/m2).

Otherwise it includes the (atmosphere + background starlight (0.0001cd/m2) * eclipse factor + light pollution.

Returns
the last computed average luminance of the atmosphere in cd/m2.

◆ getRealDisplayIntensityFactor()

float Atmosphere::getRealDisplayIntensityFactor ( ) const
inline

Get the actual atmosphere intensity due to eclipses + fader.

Returns
the display intensity ranging from 0 to 1

◆ setAverageLuminance()

void Atmosphere::setAverageLuminance ( float  overrideLum)
inline

override computable luminance.

This is for special operations only, e.g. for scripting of brightness-balanced image export. To return to auto-computed values, set any negative value at the end of the script.