Package com.luciad.maps.effects
Class EnvironmentMap.EquirectangularBuilder
java.lang.Object
com.luciad.maps.effects.EnvironmentMap.EquirectangularBuilder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
EnvironmentMap
public static final class EnvironmentMap.EquirectangularBuilder
extends Object
implements AutoCloseable
Builder for an
EnvironmentMap from a single equirectangular (2:1) image.- Since:
- 2026.1
-
Constructor Summary
ConstructorsConstructorDescriptionCopy constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the environment map.voidclose()protected voidfinalize()Sets the equirectangular image, with a 2:1 width:height ratio.intensity(double intensity) Sets the brightness of the environment, as a non-negative factor by which the environment color is multiplied.orientation(Azimuth orientation) Sets the heading of the environment.
-
Constructor Details
-
EquirectangularBuilder
Copy constructor.- Parameters:
other- the builder to copy.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
image
@NotNull public EnvironmentMap.EquirectangularBuilder image(@NotNull Image image) throws NullPointerException Sets the equirectangular image, with a 2:1 width:height ratio.This is mandatory.
- Parameters:
image- the equirectangular image. Cannot benull.- Returns:
- this builder.
- Throws:
NullPointerException- when the image isnull.
-
orientation
Sets the heading of the environment.The default is north (0 degrees).
- Parameters:
orientation- the heading of the environment.- Returns:
- this builder.
-
intensity
@NotNull public EnvironmentMap.EquirectangularBuilder intensity(double intensity) throws IllegalArgumentException Sets the brightness of the environment, as a non-negative factor by which the environment color is multiplied.This method is optional. If it is not called, the intensity is 1, which paints the imagery as-is. Values above
1brighten the environment and values below1darken it:2is twice as bright and0.5is half as bright. A value of0paints the environment black.- Parameters:
intensity- the brightness factor applied to the environment. Must not be negative.- Returns:
- this builder.
- Throws:
IllegalArgumentException- when the intensity is negative.
-
build
Builds the environment map.- Returns:
- the built environment map.
- Throws:
IllegalStateException- when no image was set.
-