|
LuciadCPillar 2026.1
|
Graphics effect that fades geometry into a fog color with increasing distance (and optionally with decreasing altitude), improving depth perception on large 3D scenes. More...
#include <luciad/maps/effects/FogEffect.h>
Public Member Functions | |
| FogEffect (const FogEffect &)=delete | |
| const std::shared_ptr< FogModel > & | getModel () const |
| Returns the fog model. | |
| bool | isEnabled () const |
| Returns whether the fog effect is enabled. | |
| FogEffect & | operator= (const FogEffect &)=delete |
| void | setEnabled (bool enabled) |
| Sets whether the fog effect is enabled. | |
| void | setModel (std::shared_ptr< FogModel > model) |
| Sets the fog model. | |
Graphics effect that fades geometry into a fog color with increasing distance (and optionally with decreasing altitude), improving depth perception on large 3D scenes.
The effect is disabled by default and is only applied to a 3D view. On a 2D view it has no effect.
|
|
Fog is an artist-controlled alternative to the AtmosphereEffect scattering model: it does not require a light, and you steer it directly with distances in meters. See the map effects article for guidance on when to use fog versus atmospheric scattering.
The fog parameters are held by an immutable luciad::FogModel. Read them with getModel and change them by building a new model and passing it to setModel.
You cannot create a FogEffect. Retrieve it from GraphicsEffects::getFog.
|
delete |
| const std::shared_ptr< FogModel > & luciad::FogEffect::getModel | ( | ) | const |
Returns the fog model.
| bool luciad::FogEffect::isEnabled | ( | ) | const |
Returns whether the fog effect is enabled.
| void luciad::FogEffect::setEnabled | ( | bool | enabled | ) |
Sets whether the fog effect is enabled.
The default is false.
| enabled | true to enable the fog effect or false to disable it. |
| void luciad::FogEffect::setModel | ( | std::shared_ptr< FogModel > | model | ) |
Sets the fog model.
| model | the fog model. |
| luciad::NullArgumentException | when the model is a nullptr value. |