Class DirectionalLightModel.Builder

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

public static final class DirectionalLightModel.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
    • ambientColor

      @NotNull public DirectionalLightModel.Builder ambientColor(@NotNull android.graphics.Color color)
      Sets the ambient color of the light.

      The default is a dark gray (64, 64, 64).

      Parameters:
      color - the ambient color of the light.
      Returns:
      this builder.
    • diffuseColor

      @NotNull public DirectionalLightModel.Builder diffuseColor(@NotNull android.graphics.Color color)
      Sets the diffuse color of the light.

      The default is white.

      Parameters:
      color - the diffuse color of the light.
      Returns:
      this builder.
    • direction

      @NotNull public DirectionalLightModel.Builder direction(@NotNull Coordinate direction)
      Sets the vector pointing towards the light source.

      This is mandatory. It does not need to be normalized.

      Parameters:
      direction - the vector pointing towards the light source.
      Returns:
      this builder.
    • build

      @NotNull public DirectionalLightModel build() throws IllegalStateException
      Builds the directional light.
      Returns:
      the built directional light.
      Throws:
      IllegalStateException - when the direction was not set.