Stellarium  0.22.2
Public Member Functions
Atmosphere Class Reference

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

#include <Atmosphere.hpp>

Public Member Functions

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)
 Compute sky brightness values and average luminance. More...
void draw (StelCore *core)
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.
SkylightgetSkyLight (void)

Detailed Description

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 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 
noScattertrue to suppress the actual sky brightness modelling. This will keep refraction/extinction working for didactic reasons.

◆ getAverageLuminance()

float Atmosphere::getAverageLuminance ( ) const

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

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

◆ getRealDisplayIntensityFactor()

float Atmosphere::getRealDisplayIntensityFactor ( ) const
the display intensity ranging from 0 to 1

◆ setAverageLuminance()

void Atmosphere::setAverageLuminance ( float  overrideLum)

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.