Package com.luciad.maps.effects
Class FogModel.Builder
java.lang.Object
com.luciad.maps.effects.FogModel.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
FogModel
- Since:
- 2026.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the fog model.voidclose()protected voidfinalize()fogColor(android.graphics.Color color) Sets the base color of the fog.halvingHeight(Double halvingHeight) Sets the altitude in meters over which the fog thins by half, in other words how tall the fog layer is.lightColor(android.graphics.Color color) Sets the color the fog takes on when looking toward the scene light (a sun-glow tint).maximumAltitude(double maximumAltitude) Sets the altitude in meters above which the fog fully fades out as the camera climbs.visibility(double visibility) Sets the visibility distance in meters: roughly the distance at which the fog fully obscures the scene at low altitude.
-
Constructor Details
-
Builder
Copy constructor.- Parameters:
other- the builder to copy.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
fogColor
Sets the base color of the fog.The default is a light sky blue.
- Parameters:
color- the base color of the fog.- Returns:
- this builder.
-
lightColor
Sets the color the fog takes on when looking toward the scene light (a sun-glow tint).This is only visible when a light is configured through
GraphicsEffects#getLight. The default is an explicit warm white. Passnullinstead to make the tint follow thescene light, taking the light's own (diffuse) color so the glow tracks the light.- Parameters:
color- the light color of the fog, ornullto derive it from the scene light.- Returns:
- this builder.
-
visibility
Sets the visibility distance in meters: roughly the distance at which the fog fully obscures the scene at low altitude.Smaller values produce thicker fog.
When a halving height is set, the fog thins with altitude, so this visibility applies near the ground and increases higher up. The default is 80000.
- Parameters:
visibility- the visibility distance in meters. Must be strictly positive.- Returns:
- this builder.
- Throws:
IllegalArgumentException- when the visibility is not strictly positive.
-
halvingHeight
@NotNull public FogModel.Builder halvingHeight(@Nullable Double halvingHeight) throws IllegalArgumentException Sets the altitude in meters over which the fog thins by half, in other words how tall the fog layer is.Pass
nullto make the fog uniform with altitude (distance-based only). The default is 4000.- Parameters:
halvingHeight- the halving height in meters, ornullto make the fog uniform with altitude. Must be strictly positive when set.- Returns:
- this builder.
- Throws:
IllegalArgumentException- when the halving height is set and not strictly positive.
-
maximumAltitude
@NotNull public FogModel.Builder maximumAltitude(double maximumAltitude) throws IllegalArgumentException Sets the altitude in meters above which the fog fully fades out as the camera climbs.The default is 20000.
- Parameters:
maximumAltitude- the maximum altitude in meters. Must be strictly positive.- Returns:
- this builder.
- Throws:
IllegalArgumentException- when the maximum altitude is not strictly positive.
-
build
Builds the fog model.- Returns:
- the built fog model.
-