Class MaterialReflectivity

  • java.lang.Object
    • com.here.sdk.mapview.MaterialReflectivity

  • public final class MaterialReflectivity
    extends java.lang.Object

    Material reflectivity properties are used to enable per‑pixel lighting for supported map objects (e.g. LocationIndicator markers and their halo).

    Lighting OFF vs ON

    By default (when no MaterialReflectivity is assigned) objects are rendered "unlit" (emissive): their texture / color appears at a constant brightness, unaffected by scene lights. Assigning a MaterialReflectivity instance to an object that supports it (e.g. LocationIndicator.materialReflectivity) automatically enables lighting for this object and all its internal components. Clearing (setting the property to null) disables lighting again and restores the unlit appearance.

    Factors

    Both factors are expected to be within [0.0, 1.0]. Values outside this range are allowed but may produce exaggerated results or be clamped by future implementations. Typical useful ranges:

    • ambientFactor: 0.0 – 0.4 (higher values flatten the shading and reduce directional contrast)
    • diffuseFactor: 0.5 – 1.0 (lower values dim the object under directional light)

    Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      double ambientFactor
      The ambient factor controls how much of the object's base color is treated as constant ambient contribution (independent of light direction) when lighting is enabled.
      double diffuseFactor
      The diffuse factor controls how much of the object's color contributes to the diffuse lighting component when lighting is enabled.
    • Constructor Summary

      Constructors 
      Constructor Description
      MaterialReflectivity()
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ambientFactor

        public double ambientFactor

        The ambient factor controls how much of the object's base color is treated as constant ambient contribution (independent of light direction) when lighting is enabled. Default value is 0.0.

      • diffuseFactor

        public double diffuseFactor

        The diffuse factor controls how much of the object's color contributes to the diffuse lighting component when lighting is enabled. Default value is 1.0.

    • Constructor Detail

      • MaterialReflectivity

        public MaterialReflectivity()

        Creates a new instance.

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object