Class HeadlightModel

java.lang.Object
com.luciad.maps.effects.LightModel
com.luciad.maps.effects.HeadlightModel
All Implemented Interfaces:
AutoCloseable

public final class HeadlightModel extends LightModel implements AutoCloseable
Light that follows the orientation of the viewer.

In a 3D view, the light follows the azimuth from the eye point to the reference point of the camera. The vertical orientation of the camera does not affect the direction of the headlight. Instead, getPitchOffset is used, unless the pitch offset is null, in which case the light follows the camera's pitch exactly.

This is the default light.

Since:
2026.1
  • Method Details

    • finalize

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

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class LightModel
    • newBuilder

      @NotNull public static HeadlightModel.Builder newBuilder()
      Creates a new builder with the default headlight parameters.
      Returns:
      a new builder.
    • asBuilder

      @NotNull public HeadlightModel.Builder asBuilder()
      Creates a builder pre-filled with this light's parameters.
      Returns:
      a builder pre-filled with this light's parameters.
    • getAmbientColor

      @NotNull public android.graphics.Color getAmbientColor()
      Returns the ambient color of the light.
      Returns:
      the ambient color of the light.
    • getDiffuseColor

      @NotNull public android.graphics.Color getDiffuseColor()
      Returns the diffuse color of the light.
      Returns:
      the diffuse color of the light.
    • getPitchOffset

      @Nullable public Double getPitchOffset()
      Returns the pitch offset in degrees, or null to follow the camera's pitch.

      The pitch offset is the fixed vertical orientation of the light.

      Returns:
      the pitch offset in degrees, or null to follow the camera's pitch.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object