Class FogModel

java.lang.Object
com.luciad.maps.effects.FogModel
All Implemented Interfaces:
AutoCloseable

public final class FogModel extends Object implements AutoCloseable
Immutable set of parameters that describe how 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. null 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
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • newBuilder

      @NotNull public static FogModel.Builder newBuilder()
      Creates a new builder with the default fog parameters.
      Returns:
      a new builder.
    • asBuilder

      @NotNull public FogModel.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, or null 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 null value derives the tint from the scene light instead of setting it explicitly.

      Returns:
      the light color of the fog, or null to derive it from the scene light.
    • getVisibility

      public double getVisibility()
      Returns the visibility distance in meters.
      Returns:
      the visibility distance in meters.
    • getHalvingHeight

      @Nullable public Double getHalvingHeight()
      Returns the halving height in meters, or null 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 null when 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()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object