Class MapSceneLights

java.lang.Object
com.here.NativeBase
com.here.sdk.mapview.MapSceneLights

public final class MapSceneLights extends NativeBase

Manage the lights and their attributes in a scene.

  • Method Details

    • setColor

      public void setColor(@NonNull MapSceneLights.Category category, @NonNull Color color, @Nullable MapSceneLights.AttributeSettingCallback callback)

      Set a new color for the light based on its category.

      Parameters:
      category -

      The category of light for which the color is set.

      color -

      The Color type includes red, green, blue, and alpha components. The value of these components must be inside the range [0, 1].

      callback -

      Optional callback that will receive the result of this operation.

    • setIntensity

      public void setIntensity(@NonNull MapSceneLights.Category category, double intensity, @Nullable MapSceneLights.AttributeSettingCallback callback)

      Set a new intensity for the light based on its category.

      Parameters:
      category -

      The category of light for which the intensity is set.

      intensity -

      The light intensity value must be inside the range [0, 10]. The intensity value is clamped to this range. If the value falls outside its supported range, it will be adjusted to stay within the range. Note: When the intensity value is big, 3D objects might turn completely white because all the color channels could go over the limit of 1.0.

      callback -

      Optional callback that will receive the result of this operation.

    • setDirection

      public void setDirection(@NonNull MapSceneLights.Category category, @NonNull MapSceneLights.Direction direction, @Nullable MapSceneLights.AttributeSettingCallback callback)

      Set a new direction for the light based on its category.

      Parameters:
      category -

      The category of light for which the direction is set.

      direction -

      The Direction contains azimuth and altitude angles in degrees.

      callback -

      Optional callback that will receive the result of this operation.

    • getColor

      @Nullable public Color getColor(@NonNull MapSceneLights.Category category)

      Retrieves the current color of the light based on its category.

      Parameters:
      category -

      The category of light from which the color is retrieved.

      Returns:

      The current color of the light, or null if the light is missing from the loaded scene or MapScene is not intitialized.

    • getIntensity

      @Nullable public Double getIntensity(@NonNull MapSceneLights.Category category)

      Retrieves the current intensity of the light based on its category.

      Parameters:
      category -

      The category of light from which the intensity is retrieved.

      Returns:

      The current intensity of the light, or null if the light is missing from the loaded scene or MapScene is not intitialized.

    • getDirection

      @Nullable public MapSceneLights.Direction getDirection(@NonNull MapSceneLights.Category category)

      Retrieves the current direction of the light based on its category.

      Parameters:
      category -

      The category of light from which the direction is retrieved.

      Returns:

      The current direction of the light, or null if the light is missing from the loaded scene or MapScene is not intitialized.

    • reset

      public void reset()

      Resets all attributes of each light to their default values based on the current map scene settings.