Class PositionIndicatorMeshRepresentationBuilder
Builder for creating immutable PositionIndicatorMeshRepresentation instances. Only the geometry URI is required. All other properties have documented defaults.
-
Constructor Summary
ConstructorsConstructorDescriptionPositionIndicatorMeshRepresentationBuilder(String geometryUri) Creates a new builder with the required geometry URI. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds an immutable PositionIndicatorMeshRepresentation with the configured properties.withAmbientFactor(double ambientFactor) Sets the ambient lighting factor in range 0.0 to 1.0.Sets the modulation color.withDiffuseFactor(double diffuseFactor) Sets the diffuse lighting factor in range 0.0 to 1.0.withFlipTextureVertically(boolean flip) Sets whether the texture image is flipped vertically before use.withLightingEnabled(boolean lightingEnabled) Sets whether lighting is applied to the object color.withTextureUri(String textureUri) Sets the diffuse texture URI.
-
Constructor Details
-
PositionIndicatorMeshRepresentationBuilder
Creates a new builder with the required geometry URI. 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
-
withTextureUri
@NonNull public PositionIndicatorMeshRepresentationBuilder withTextureUri(@NonNull String textureUri) Sets the diffuse texture URI. Default is empty (no texture).
- Parameters:
textureUri-Uniform resource identifier for the diffuse texture.
- Returns:
This builder instance.
-
withFlipTextureVertically
Sets whether the texture image is flipped vertically before use. Default is true.
- Parameters:
flip-If true, the texture image is flipped vertically.
- Returns:
This builder instance.
-
withColor
Sets the modulation color. Default is white (1, 1, 1, 1).
- Parameters:
color-The modulation color.
- Returns:
This builder instance.
-
withAmbientFactor
Sets the ambient lighting factor in range 0.0 to 1.0. Default is 0.0.
- Parameters:
ambientFactor-The ambient lighting factor.
- Returns:
This builder instance.
-
withDiffuseFactor
Sets the diffuse lighting factor in range 0.0 to 1.0. Default is 1.0.
- Parameters:
diffuseFactor-The diffuse lighting factor.
- Returns:
This builder instance.
-
withLightingEnabled
@NonNull public PositionIndicatorMeshRepresentationBuilder withLightingEnabled(boolean lightingEnabled) Sets whether lighting is applied to the object color. Default is false.
- Parameters:
lightingEnabled-If true, lighting is applied.
- Returns:
This builder instance.
-
build
Builds an immutable PositionIndicatorMeshRepresentation with the configured properties.
- Returns:
A new PositionIndicatorMeshRepresentation instance.
-