Class PositionIndicatorMeshRepresentation

java.lang.Object
com.here.NativeBase
com.here.sdk.mapview.mapobject.PositionIndicatorRepresentation
com.here.sdk.mapview.mapobject.PositionIndicatorMeshRepresentation

public final class PositionIndicatorMeshRepresentation extends PositionIndicatorRepresentation

Mesh-based visual representation of a PositionIndicator: geometry, texture, color and lighting. Attach it to a PositionIndicator via setRepresentation.

  • Constructor Details

    • PositionIndicatorMeshRepresentation

      public PositionIndicatorMeshRepresentation(@NonNull String geometryUri)

      Creates a mesh representation with the given geometry. The Uri can reference a registered asset in the AssetManager or a file. The referenced content is expected in the Wavefront obj format.

      Parameters:
      geometryUri -

      Uniform resource identifier for data in Wavefront obj format.

  • Method Details

    • setTexture

      public void setTexture(@NonNull String textureUri)

      Sets the diffuse texture. The Uri can reference a registered asset in the AssetManager or a file.

      Parameters:
      textureUri -

      Uniform resource identifier for the diffuse texture.

    • setFlipTextureVertically

      public void setFlipTextureVertically(boolean flip)

      Sets whether to flip the image vertically. The default is true.

      Parameters:
      flip -

      If true, the texture image is flipped vertically before use.

    • setColor

      public void setColor(@NonNull Color color)

      Sets the color which will modulate the diffuse texture color. The default is white.

      Parameters:
      color -

      The modulation color.

    • setAmbientFactor

      public void setAmbientFactor(double factor)

      Sets the ambient factor used when computing lighting. Default is 0.0.

      Parameters:
      factor -

      The ambient lighting factor in range 0.0 to 1.0.

    • setDiffuseFactor

      public void setDiffuseFactor(double factor)

      Sets the diffuse factor used when computing lighting. Default is 1.0.

      Parameters:
      factor -

      The diffuse lighting factor in range 0.0 to 1.0.

    • enableLighting

      public void enableLighting(boolean state)

      Enables/Disables light interaction with the object color. Default is disabled.

      Parameters:
      state -

      If true, lighting is applied to the object color.