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
geometryUriUniform 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
textureUriUniform 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
flipIf
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
colorThe modulation color.
-
Sets the ambient factor used when computing lighting. Default is
0.0.Declaration
Swift
public func setAmbientFactor(_ factor: Double)Parameters
factorThe 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
factorThe 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
stateIf
true, lighting is applied to the object color.