PositionIndicatorMeshRepresentation

public class PositionIndicatorMeshRepresentation : PositionIndicatorRepresentation

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

  • 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.

    Declaration

    Swift

    public init(_ geometryUri: String)

    Parameters

    geometryUri

    Uniform resource identifier for data in Wavefront obj format.

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

    Declaration

    Swift

    public func setTexture(_ textureUri: String)

    Parameters

    textureUri

    Uniform resource identifier for the diffuse texture.

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

    Declaration

    Swift

    public func setFlipTextureVertically(_ flip: Bool)

    Parameters

    flip

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

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

    Declaration

    Swift

    public func setColor(_ color: UIColor)

    Parameters

    color

    The modulation color.

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

    Declaration

    Swift

    public func setAmbientFactor(_ factor: Double)

    Parameters

    factor

    The ambient lighting factor in range 0.0 to 1.0.

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

    Declaration

    Swift

    public func setDiffuseFactor(_ factor: Double)

    Parameters

    factor

    The diffuse lighting factor in range 0.0 to 1.0.

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

    Declaration

    Swift

    public func enableLighting(state: Bool)

    Parameters

    state

    If true, lighting is applied to the object color.