|
LuciadCPillar 2026.1.01
|
Graphics effect which adds a sky/atmosphere background to a 3D view. More...
#include <luciad/maps/effects/AtmosphereEffect.h>
Public Member Functions | |
| AtmosphereEffect (const AtmosphereEffect &)=delete | |
| const std::shared_ptr< AtmosphereModel > & | getModel () const |
| Returns the atmosphere model. | |
| bool | isEnabled () const |
| Returns whether the atmosphere effect is enabled. | |
| AtmosphereEffect & | operator= (const AtmosphereEffect &)=delete |
| void | setEnabled (bool enabled) |
| Sets whether the atmosphere effect is enabled. | |
| void | setModel (std::shared_ptr< AtmosphereModel > model) |
| Sets the atmosphere model. | |
Graphics effect which adds a sky/atmosphere background to a 3D view.
The effect is enabled by default, but it is only applied to a 3D view. On a 2D view it has no visible effect.
The atmosphere is described by an immutable luciad::AtmosphereModel, of which there are two:
luciad::GradientAtmosphereModel (the default) draws a simple sky/horizon color gradient around the globe.luciad::ScatteringAtmosphereModel draws a physically based Rayleigh/Mie scattering sky. It requires a geocentric 3D view and a light configured through GraphicsEffects::getLight. Without both, it falls back to the gradient. Rendering it has a minor additional performance cost compared to the gradient model.
|
|
|
|
The atmosphere describes the planet's sky and, optionally, tints distant terrain so it fades into the sky with distance (an effect known as aerial perspective). That tinting is physically derived from the sun position and the air, so it is realistic but not directly adjustable. If you want to control haze yourself, and set its color and the distance at which things fade from view, use FogEffect instead. See the map effects article for guidance on choosing between the two.
Read the active model with getModel and narrow it to its concrete type, and change it by building a new model and passing it to setModel.
You cannot create an AtmosphereEffect. Instead, you can retrieve it from luciad::GraphicsEffects::getAtmosphere.
|
delete |
| const std::shared_ptr< AtmosphereModel > & luciad::AtmosphereEffect::getModel | ( | ) | const |
Returns the atmosphere model.
| bool luciad::AtmosphereEffect::isEnabled | ( | ) | const |
Returns whether the atmosphere effect is enabled.
|
delete |
| void luciad::AtmosphereEffect::setEnabled | ( | bool | enabled | ) |
Sets whether the atmosphere effect is enabled.
The default is true.
| enabled | true to enable the atmosphere effect or false to disable it. |
| void luciad::AtmosphereEffect::setModel | ( | std::shared_ptr< AtmosphereModel > | model | ) |
Sets the atmosphere model.
The default is a luciad::GradientAtmosphereModel with default parameters.
| model | the atmosphere model. |
| luciad::NullArgumentException | when the model is a nullptr value. |