Class PositionIndicatorMeshRepresentation
Mesh-based visual representation of a PositionIndicator: geometry, texture, color and lighting. Attach it to a PositionIndicator via setRepresentation.
-
Constructor Summary
ConstructorsConstructorDescriptionPositionIndicatorMeshRepresentation(String geometryUri) Creates a mesh representation with the given geometry. -
Method Summary
Modifier and TypeMethodDescriptionvoidenableLighting(boolean state) Enables/Disables light interaction with the object color.voidsetAmbientFactor(double factor) Sets the ambient factor used when computing lighting.voidSets the color which will modulate the diffuse texture color.voidsetDiffuseFactor(double factor) Sets the diffuse factor used when computing lighting.voidsetFlipTextureVertically(boolean flip) Sets whether to flip the image vertically.voidsetTexture(String textureUri) Sets the diffuse texture.
-
Constructor Details
-
PositionIndicatorMeshRepresentation
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
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
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.
-