LuciadCPillar 2026.1
Loading...
Searching...
No Matches
luciad::FogModel Class Referencefinal

Immutable set of parameters that describe how luciad::FogEffect fades geometry into a fog color. More...

#include <luciad/maps/effects/FogModel.h>

Classes

class  Builder
 Builder for a luciad::FogModel. More...

Public Member Functions

 FogModel (const FogModel &)=delete
 ~FogModel ()
Builder asBuilder () const
 Creates a builder pre-filled with this model's parameters.
Color getFogColor () const
 Returns the base color of the fog.
std::optional< double > getHalvingHeight () const
 Returns the halving height in meters, or std::nullopt when the fog is uniform with altitude.
std::optional< Color > getLightColor () const
 Returns the light color of the fog, or std::nullopt to derive it from the scene light.
double getMaximumAltitude () const
 Returns the maximum altitude in meters.
double getVisibility () const
 Returns the visibility distance in meters.
FogModel & operator= (const FogModel &)=delete
bool operator== (const FogModel &other) const
 Returns whether this model is equal to another.

Static Public Member Functions

static Builder newBuilder ()
 Creates a new builder with the default fog parameters.

Detailed Description

Immutable set of parameters that describe how luciad::FogEffect fades geometry into a fog color.

Fog is controlled with distances in meters:

  • getVisibility is the distance at which the fog fully obscures the scene near the ground (smaller is thicker).
  • getHalvingHeight is the altitude over which the fog thins by half. std::nullopt makes the fog uniform with altitude.
  • getMaximumAltitude switches the fog off once the camera climbs above it.

A sun-glow tint (getLightColor) is applied when looking toward the scene light, but only when a light is configured through GraphicsEffects::getLight.

Create one with FogModel::newBuilder, or start from an existing model with asBuilder, and apply it with FogEffect::setModel.

Since
2026.1

Constructor & Destructor Documentation

◆ ~FogModel()

luciad::FogModel::~FogModel ( )

◆ FogModel()

luciad::FogModel::FogModel ( const FogModel & )
delete

Member Function Documentation

◆ asBuilder()

Builder luciad::FogModel::asBuilder ( ) const

Creates a builder pre-filled with this model's parameters.

Returns
a builder pre-filled with this model's parameters.

◆ getFogColor()

Color luciad::FogModel::getFogColor ( ) const

Returns the base color of the fog.

Returns
the base color of the fog.

◆ getHalvingHeight()

std::optional< double > luciad::FogModel::getHalvingHeight ( ) const

Returns the halving height in meters, or std::nullopt when the fog is uniform with altitude.

The halving height is the altitude over which the fog thins by half.

Returns
the halving height in meters, or std::nullopt when the fog is uniform with altitude.

◆ getLightColor()

std::optional< Color > luciad::FogModel::getLightColor ( ) const

Returns the light color of the fog, or std::nullopt to derive it from the scene light.

This is the color the fog takes on when looking toward the scene light (a sun-glow tint). A std::nullopt value derives the tint from the scene light instead of setting it explicitly.

Returns
the light color of the fog, or std::nullopt to derive it from the scene light.

◆ getMaximumAltitude()

double luciad::FogModel::getMaximumAltitude ( ) const

Returns the maximum altitude in meters.

The fog fully fades out once the camera climbs above the maximum altitude.

Returns
the maximum altitude in meters.

◆ getVisibility()

double luciad::FogModel::getVisibility ( ) const

Returns the visibility distance in meters.

Returns
the visibility distance in meters.

◆ newBuilder()

Builder luciad::FogModel::newBuilder ( )
static

Creates a new builder with the default fog parameters.

Returns
a new builder.

◆ operator=()

FogModel & luciad::FogModel::operator= ( const FogModel & )
delete

◆ operator==()

bool luciad::FogModel::operator== ( const FogModel & other) const

Returns whether this model is equal to another.

Parameters
otherthe model to compare with.
Returns
whether this model is equal to another.