Class ScatteringAtmosphereModel.Builder

java.lang.Object
com.luciad.maps.effects.ScatteringAtmosphereModel.Builder
All Implemented Interfaces:
AutoCloseable
Enclosing class:
ScatteringAtmosphereModel

public static final class ScatteringAtmosphereModel.Builder extends Object implements AutoCloseable
Since:
2026.1
  • Constructor Details

  • Method Details

    • finalize

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

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

      @NotNull public ScatteringAtmosphereModel.Builder brightness(double brightness) throws IllegalArgumentException
      Sets the scattering brightness, an exposure multiplier on the scattered light.

      The default is 2.

      Parameters:
      brightness - the scattering brightness. Must be non-negative.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - when the brightness is negative.
    • rayleighFactor

      @NotNull public ScatteringAtmosphereModel.Builder rayleighFactor(double rayleighFactor) throws IllegalArgumentException
      Sets the Rayleigh scattering strength, which drives the blue of the sky.

      The default is 1.

      Parameters:
      rayleighFactor - the Rayleigh scattering strength. Must be non-negative.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - when the Rayleigh strength is negative.
    • mieFactor

      @NotNull public ScatteringAtmosphereModel.Builder mieFactor(double mieFactor) throws IllegalArgumentException
      Sets the Mie scattering strength, which drives the amount of aerosol haze and the sun glow.

      The default is 1.

      Parameters:
      mieFactor - the Mie scattering strength. Must be non-negative.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - when the Mie strength is negative.
    • mieAnisotropy

      @NotNull public ScatteringAtmosphereModel.Builder mieAnisotropy(double mieAnisotropy) throws IllegalArgumentException
      Sets how tightly the Mie haze clusters around the sun, in the range [0, 1).

      A value of 0 spreads the haze evenly across the whole sky, while higher values pull it into a tighter, brighter glow close to the sun. Typical values are between 0.75 and 1. The default is 0.95.

      Parameters:
      mieAnisotropy - the Mie anisotropy, in [0, 1).
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - when the Mie anisotropy is outside the range [0, 1).
    • aerialPerspective

      @NotNull public ScatteringAtmosphereModel.Builder aerialPerspective(boolean aerialPerspective)
      Sets whether aerial perspective is enabled, tinting the terrain surface in addition to coloring the sky.

      Aerial perspective is the phenomenon where distant terrain takes on the color of the atmosphere and fades toward the horizon the farther away it is, because more air scatters light between the viewer and the terrain. When enabled, the same physically based scattering that colors the sky is also applied to the terrain surface. The default is false.

      Parameters:
      aerialPerspective - whether aerial perspective is enabled.
      Returns:
      this builder.
    • build

      @NotNull public ScatteringAtmosphereModel build()
      Builds the scattering atmosphere model.
      Returns:
      the built scattering atmosphere model.