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 Details

  • Method Details

    • finalize

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

      public void close()
      Specified by:
      close in interface AutoCloseable
    • 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 be null.
      Returns:
      this builder.
      Throws:
      NullPointerException - when the image is null.
    • orientation

      @NotNull public EnvironmentMap.EquirectangularBuilder orientation(@NotNull Azimuth 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 1 brighten the environment and values below 1 darken it: 2 is twice as bright and 0.5 is half as bright. A value of 0 paints 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

      @NotNull public EnvironmentMap build() throws IllegalStateException
      Builds the environment map.
      Returns:
      the built environment map.
      Throws:
      IllegalStateException - when no image was set.