Package com.luciad.maps.effects
Class ScatteringAtmosphereModel.Builder
java.lang.Object
com.luciad.maps.effects.ScatteringAtmosphereModel.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
ScatteringAtmosphereModel
Builder for a ScatteringAtmosphereModel.- Since:
- 2026.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaerialPerspective(boolean aerialPerspective) Sets whether aerial perspective is enabled, tinting the terrain surface in addition to coloring the sky.brightness(double brightness) Sets the scattering brightness, an exposure multiplier on the scattered light.build()Builds the scattering atmosphere model.voidclose()protected voidfinalize()mieAnisotropy(double mieAnisotropy) Sets how tightly the Mie haze clusters around the sun, in the range [0, 1).mieFactor(double mieFactor) Sets the Mie scattering strength, which drives the amount of aerosol haze and the sun glow.rayleighFactor(double rayleighFactor) Sets the Rayleigh scattering strength, which drives the blue of the sky.
-
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
-
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
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
Builds the scattering atmosphere model.- Returns:
- the built scattering atmosphere model.
-