Package com.luciad.maps.effects
Class FogModel
java.lang.Object
com.luciad.maps.effects.FogModel
- All Implemented Interfaces:
AutoCloseable
Immutable set of parameters that describe how
FogEffect fades geometry into a fog color.
Fog is controlled with distances in meters:
getVisibilityis the distance at which the fog fully obscures the scene near the ground (smaller is thicker).getHalvingHeightis the altitude over which the fog thins by half.nullmakes the fog uniform with altitude.getMaximumAltitudeswitches 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
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionCreates a builder pre-filled with this model's parameters.voidclose()booleanprotected voidfinalize()android.graphics.ColorReturns the base color of the fog.Returns the halving height in meters, ornullwhen the fog is uniform with altitude.android.graphics.ColorReturns the light color of the fog, ornullto derive it from the scene light.doubleReturns the maximum altitude in meters.doubleReturns the visibility distance in meters.inthashCode()static FogModel.BuilderCreates a new builder with the default fog parameters.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
newBuilder
Creates a new builder with the default fog parameters.- Returns:
- a new builder.
-
asBuilder
Creates a builder pre-filled with this model's parameters.- Returns:
- a builder pre-filled with this model's parameters.
-
getFogColor
@NotNull public android.graphics.Color getFogColor()Returns the base color of the fog.- Returns:
- the base color of the fog.
-
getLightColor
@Nullable public android.graphics.Color getLightColor()Returns the light color of the fog, ornullto derive it from the scene light.This is the color the fog takes on when looking toward the
scene light(a sun-glow tint). Anullvalue derives the tint from the scene light instead of setting it explicitly.- Returns:
- the light color of the fog, or
nullto derive it from the scene light.
-
getVisibility
public double getVisibility()Returns the visibility distance in meters.- Returns:
- the visibility distance in meters.
-
getHalvingHeight
Returns the halving height in meters, ornullwhen 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
nullwhen the fog is uniform with altitude.
-
getMaximumAltitude
public double getMaximumAltitude()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.
-
hashCode
public int hashCode() -
equals
-