A 3D model map object (Wavefront OBJ) placed on the location view.
More...
|
| abstract boolean | setPosition (LocationPoint point) |
| | Sets the anchor position of the model in metric coordinates.
|
| |
| abstract boolean | setPositionAnimated (LocationPoint point, float duration, AnimationType type) |
| | Animates the model anchor to a new position.
|
| |
| abstract boolean | setModel (com.navigine.model.ModelProvider model) |
| | Sets the 3D asset (OBJ source + texture ImageProvider).
|
| |
| abstract boolean | setSize (float width, float height) |
| | Sets the on-screen size of the model in pixels (width and height).
|
| |
| abstract boolean | setCollisionEnabled (boolean enabled) |
| | Enables or disables collision tests for this object.
|
| |
| abstract boolean | setAngle (float angle) |
| | Sets rotation angle in degrees (around the placement axis used by the engine).
|
| |
| abstract boolean | setAngleAnimated (float angle, float duration, AnimationType type) |
| | Animates rotation to the given angle.
|
| |
| abstract boolean | setBuffer (float width, float height) |
| | Extra hit-test padding around the model in pixels.
|
| |
| abstract boolean | setPriority (float priority) |
| | Render order priority (higher draws above).
|
| |
| abstract int | getId () |
| | Gets the unique identifier of the map object.
|
| |
| abstract MapObjectType | getType () |
| | Gets the type of the map object.
|
| |
| abstract byte[] | getData () |
| | Gets the user-defined data associated with the map object.
|
| |
| abstract boolean | setVisible (boolean visible) |
| | Method is used to specify the visibility of the map object.
|
| |
| abstract boolean | setInteractive (boolean interactive) |
| | Method is used to specify whether the map object can be interacted with.
|
| |
| abstract void | setData (byte[] data) |
| | Method is used to set user-defined data for the map object.
|
| |
| abstract boolean | setTitle (String title) |
| | Method is used to set the title of the map object.
|
| |
| abstract boolean | setAlpha (float alpha) |
| | Method is used to set the opacity of the map object.
|
| |
A 3D model map object (Wavefront OBJ) placed on the location view.
Geometry and texture come from ModelProvider. The mesh is loaded asynchronously in the render pipeline; blocking calls occur only inside provider callbacks.
Referenced from LocationWindow (addModelMapObject).
Definition at line 20 of file ModelMapObject.java.
◆ getData()
| abstract byte[] com.navigine.idl.java.MapObject.getData |
( |
| ) |
|
|
abstractinherited |
Gets the user-defined data associated with the map object.
- Returns
- The data stored in the map object.
Java code snippet:
Map<String, String> retrievedData = circleMapObject.getData();
System.out.println("Circle custom data: " + retrievedData);
Kotlin code snippet:
// Get custom data
val retrievedData = circleMapObject!!.data
println("Circle custom data: $retrievedData")
◆ getId()
| abstract int com.navigine.idl.java.MapObject.getId |
( |
| ) |
|
|
abstractinherited |
Gets the unique identifier of the map object.
- Returns
- The unique identifier of the map object.
Java code snippet:
int objectId = circleMapObject.getId();
System.out.println("Circle object ID: " + objectId);
Kotlin code snippet:
// Get object ID
val objectId = circleMapObject!!.id
println("Circle object ID: $objectId")
◆ getType()
| abstract MapObjectType com.navigine.idl.java.MapObject.getType |
( |
| ) |
|
|
abstractinherited |
Gets the type of the map object.
- Returns
- The type of the map object MapObjectType.
Java code snippet:
String objectTypeString = circleMapObject.getType();
System.out.println("Circle object type: " + objectTypeString);
Kotlin code snippet:
// Get object type
val objectTypeString = circleMapObject!!.type
println("Circle object type: $objectTypeString")
◆ setAlpha()
| abstract boolean com.navigine.idl.java.MapObject.setAlpha |
( |
float | alpha | ) |
|
|
abstractinherited |
Method is used to set the opacity of the map object.
- Parameters
-
| alpha | Opacity multiplier. Values below 0 will be set to 0. Values above 1 will be set to 1. Default: 1. |
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean alphaSuccess = circleMapObject.setAlpha(0.7);
System.out.println("Set circle alpha to 0.7: " + alphaSuccess);
Kotlin code snippet:
// Set alpha transparency
val alphaSuccess = circleMapObject!!.setAlpha(0.7)
println("Set circle alpha to 0.7: $alphaSuccess")
◆ setAngle()
| abstract boolean com.navigine.idl.java.ModelMapObject.setAngle |
( |
float | angle | ) |
|
|
abstract |
Sets rotation angle in degrees (around the placement axis used by the engine).
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean angleOk = modelMapObject.setAngle(45.0f);
System.out.println("Model setAngle: " + angleOk);
Kotlin code snippet:
println("Model setAngle: ${m.setAngle(45.0f)}")
◆ setAngleAnimated()
| abstract boolean com.navigine.idl.java.ModelMapObject.setAngleAnimated |
( |
float | angle, |
|
|
float | duration, |
|
|
AnimationType | type ) |
|
abstract |
Animates rotation to the given angle.
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean angleAnimOk = modelMapObject.setAngleAnimated(90.0f, 0.5f, AnimationType.QUINT);
System.out.println("Model setAngleAnimated: " + angleAnimOk);
Kotlin code snippet:
println("Model setAngleAnimated: ${m.setAngleAnimated(90.0f, 0.5f, AnimationType.QUINT)}")
◆ setBuffer()
| abstract boolean com.navigine.idl.java.ModelMapObject.setBuffer |
( |
float | width, |
|
|
float | height ) |
|
abstract |
Extra hit-test padding around the model in pixels.
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean bufOk = modelMapObject.setBuffer(4.0f, 4.0f);
System.out.println("Model setBuffer: " + bufOk);
Kotlin code snippet:
println("Model setBuffer: ${m.setBuffer(4.0f, 4.0f)}")
◆ setCollisionEnabled()
| abstract boolean com.navigine.idl.java.ModelMapObject.setCollisionEnabled |
( |
boolean | enabled | ) |
|
|
abstract |
Enables or disables collision tests for this object.
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean collOk = modelMapObject.setCollisionEnabled(true);
System.out.println("Model setCollisionEnabled: " + collOk);
Kotlin code snippet:
println("Model setCollisionEnabled: ${m.setCollisionEnabled(true)}")
◆ setData()
| abstract void com.navigine.idl.java.MapObject.setData |
( |
byte[] | data | ) |
|
|
abstractinherited |
Method is used to set user-defined data for the map object.
- Parameters
-
| data | Data to store in the map object. |
Java code snippet:
Map<String, String> customData = new HashMap<>();
customData.put("key", "value");
customData.put("number", "42");
boolean dataSuccess = circleMapObject.setData(customData);
System.out.println("Set circle custom data: " + dataSuccess);
Kotlin code snippet:
// Set custom data
val customData = mapOf("key" to "value", "number" to "42")
val dataSuccess = circleMapObject!!.setData(customData)
println("Set circle custom data: $dataSuccess")
◆ setInteractive()
| abstract boolean com.navigine.idl.java.MapObject.setInteractive |
( |
boolean | interactive | ) |
|
|
abstractinherited |
Method is used to specify whether the map object can be interacted with.
- Parameters
-
| interactive | Specifies whether the object can be picked in the pickMapObjectAt method (true) or not (false). Default: false. |
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean interactiveSuccess = circleMapObject.setInteractive(true);
System.out.println("Set circle interactive to true: " + interactiveSuccess);
Kotlin code snippet:
// Set interactive mode
val interactiveSuccess = circleMapObject!!.setInteractive(true)
println("Set circle interactive to true: $interactiveSuccess")
◆ setModel()
| abstract boolean com.navigine.idl.java.ModelMapObject.setModel |
( |
com.navigine.model.ModelProvider | model | ) |
|
|
abstract |
Sets the 3D asset (OBJ source + texture ImageProvider).
- Parameters
-
| model | Model provider ModelProvider. |
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
ImageProvider texture = ImageProvider.fromFile("/path/to/model_texture.png", true);
ModelProvider model = ModelProvider.fromFile("/path/to/model.obj", texture);
boolean modelOk = modelMapObject.setModel(model);
System.out.println("Model setModel: " + modelOk);
Kotlin code snippet:
val texture = ImageProvider.fromFile("/path/to/model_texture.png", true)
val model = ModelProvider.fromFile("/path/to/model.obj", texture)
val modelOk = m.setModel(model)
println("Model setModel: $modelOk")
◆ setPosition()
| abstract boolean com.navigine.idl.java.ModelMapObject.setPosition |
( |
LocationPoint | point | ) |
|
|
abstract |
Sets the anchor position of the model in metric coordinates.
- Parameters
-
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
LocationPoint modelPoint = new LocationPoint(12.0, 34.0);
boolean posOk = modelMapObject.setPosition(modelPoint);
System.out.println("Model setPosition: " + posOk);
Kotlin code snippet:
val posOk = m.setPosition(LocationPoint(12.0, 34.0))
println("Model setPosition: $posOk")
◆ setPositionAnimated()
| abstract boolean com.navigine.idl.java.ModelMapObject.setPositionAnimated |
( |
LocationPoint | point, |
|
|
float | duration, |
|
|
AnimationType | type ) |
|
abstract |
Animates the model anchor to a new position.
- Parameters
-
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean posAnimOk = modelMapObject.setPositionAnimated(
new LocationPoint(15.0, 40.0), 0.5f, AnimationType.SINE);
System.out.println("Model setPositionAnimated: " + posAnimOk);
Kotlin code snippet:
val posAnimOk = m.setPositionAnimated(LocationPoint(15.0, 40.0), 0.5f, AnimationType.SINE)
println("Model setPositionAnimated: $posAnimOk")
◆ setPriority()
| abstract boolean com.navigine.idl.java.ModelMapObject.setPriority |
( |
float | priority | ) |
|
|
abstract |
Render order priority (higher draws above).
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean priOk = modelMapObject.setPriority(10.0f);
System.out.println("Model setPriority: " + priOk);
Kotlin code snippet:
println("Model setPriority: ${m.setPriority(10.0f)}")
◆ setSize()
| abstract boolean com.navigine.idl.java.ModelMapObject.setSize |
( |
float | width, |
|
|
float | height ) |
|
abstract |
Sets the on-screen size of the model in pixels (width and height).
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean sizeOk = modelMapObject.setSize(64.0f, 64.0f);
System.out.println("Model setSize: " + sizeOk);
Kotlin code snippet:
val sizeOk = m.setSize(64.0f, 64.0f)
println("Model setSize: $sizeOk")
◆ setTitle()
| abstract boolean com.navigine.idl.java.MapObject.setTitle |
( |
String | title | ) |
|
|
abstractinherited |
Method is used to set the title of the map object.
- Parameters
-
| title | The title to display on the location view. |
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean titleSuccess = circleMapObject.setTitle("Circle Object");
System.out.println("Set circle title to 'Circle Object': " + titleSuccess);
Kotlin code snippet:
// Set title
val titleSuccess = circleMapObject!!.setTitle("Circle Object")
println("Set circle title to 'Circle Object': $titleSuccess")
◆ setVisible()
| abstract boolean com.navigine.idl.java.MapObject.setVisible |
( |
boolean | visible | ) |
|
|
abstractinherited |
Method is used to specify the visibility of the map object.
- Parameters
-
| visible | Specifies whether the object is visible (true) or hidden (false). Default: true. |
- Returns
- true if the operation is successful, false otherwise.
Java code snippet:
boolean visibleSuccess = circleMapObject.setVisible(true);
System.out.println("Set circle visibility to true: " + visibleSuccess);
Kotlin code snippet:
// Set visibility
val visibleSuccess = circleMapObject!!.setVisible(true)
println("Set circle visibility to true: $visibleSuccess")
The documentation for this class was generated from the following file: