Loading...
Searching...
No Matches
com.navigine.idl.java.internal.ModelMapObjectBinding Class Reference
+ Inheritance diagram for com.navigine.idl.java.internal.ModelMapObjectBinding:

Public Member Functions

native boolean isValid ()
 
boolean setPosition (LocationPoint point)
 Sets the anchor position of the model in metric coordinates.
 
boolean setPositionAnimated (LocationPoint point, float duration, AnimationType type)
 Animates the model anchor to a new position.
 
boolean setModel (com.navigine.model.ModelProvider model)
 Sets the 3D asset (OBJ source + texture ImageProvider).
 
boolean setSize (float width, float height)
 Sets the on-screen size of the model in pixels (width and height).
 
boolean setCollisionEnabled (boolean enabled)
 Enables or disables collision tests for this object.
 
boolean setAngle (float angle)
 Sets rotation angle in degrees (around the placement axis used by the engine).
 
boolean setAngleAnimated (float angle, float duration, AnimationType type)
 Animates rotation to the given angle.
 
boolean setBuffer (float width, float height)
 Extra hit-test padding around the model in pixels.
 
boolean setPriority (float priority)
 Render order priority (higher draws above).
 
int getId ()
 Gets the unique identifier of the map object.
 
MapObjectType getType ()
 Gets the type of the map object.
 
byte[] getData ()
 Gets the user-defined data associated with the map object.
 
boolean setVisible (boolean visible)
 Method is used to specify the visibility of the map object.
 
boolean setInteractive (boolean interactive)
 Method is used to specify whether the map object can be interacted with.
 
void setData (byte[] data)
 Method is used to set user-defined data for the map object.
 
boolean setTitle (String title)
 Method is used to set the title of the map object.
 
boolean setAlpha (float alpha)
 Method is used to set the opacity of the map object.
 

Detailed Description

Definition at line 13 of file ModelMapObjectBinding.java.

Member Function Documentation

◆ getData()

byte[] com.navigine.idl.java.internal.ModelMapObjectBinding.getData ( )
inline

Gets the user-defined data associated with the map object.

Returns
The data stored in the map object.

Java code snippet:

// Get custom data
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")

Reimplemented from com.navigine.idl.java.MapObject.

Definition at line 107 of file ModelMapObjectBinding.java.

◆ getId()

int com.navigine.idl.java.internal.ModelMapObjectBinding.getId ( )
inline

Gets the unique identifier of the map object.

Returns
The unique identifier of the map object.

Java code snippet:

// Get object ID
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")

Reimplemented from com.navigine.idl.java.MapObject.

Definition at line 93 of file ModelMapObjectBinding.java.

◆ getType()

MapObjectType com.navigine.idl.java.internal.ModelMapObjectBinding.getType ( )
inline

Gets the type of the map object.

Returns
The type of the map object MapObjectType.

Java code snippet:

// Get object type
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")

Reimplemented from com.navigine.idl.java.MapObject.

Definition at line 100 of file ModelMapObjectBinding.java.

◆ isValid()

native boolean com.navigine.idl.java.internal.ModelMapObjectBinding.isValid ( )

Tells if this ModelMapObject is valid or not. Any other method (except for this one) called on an invalid ModelMapObject will throw java.lang.RuntimeException.

Reimplemented from com.navigine.idl.java.ModelMapObject.

◆ setAlpha()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setAlpha ( float alpha)
inline

Method is used to set the opacity of the map object.

Parameters
alphaOpacity 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:

// Set alpha transparency
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")

Reimplemented from com.navigine.idl.java.MapObject.

Definition at line 142 of file ModelMapObjectBinding.java.

◆ setAngle()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setAngle ( float angle)
inline

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)}")

Reimplemented from com.navigine.idl.java.ModelMapObject.

Definition at line 63 of file ModelMapObjectBinding.java.

◆ setAngleAnimated()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setAngleAnimated ( float angle,
float duration,
AnimationType type )
inline

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)}")

Reimplemented from com.navigine.idl.java.ModelMapObject.

Definition at line 70 of file ModelMapObjectBinding.java.

◆ setBuffer()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setBuffer ( float width,
float height )
inline

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)}")

Reimplemented from com.navigine.idl.java.ModelMapObject.

Definition at line 77 of file ModelMapObjectBinding.java.

◆ setCollisionEnabled()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setCollisionEnabled ( boolean enabled)
inline

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)}")

Reimplemented from com.navigine.idl.java.ModelMapObject.

Definition at line 56 of file ModelMapObjectBinding.java.

◆ setData()

void com.navigine.idl.java.internal.ModelMapObjectBinding.setData ( byte[] data)
inline

Method is used to set user-defined data for the map object.

Parameters
dataData to store in the map object.

Java code snippet:

// Set custom data
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")

Reimplemented from com.navigine.idl.java.MapObject.

Definition at line 128 of file ModelMapObjectBinding.java.

◆ setInteractive()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setInteractive ( boolean interactive)
inline

Method is used to specify whether the map object can be interacted with.

Parameters
interactiveSpecifies 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:

// Set interactive mode
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")

Reimplemented from com.navigine.idl.java.MapObject.

Definition at line 121 of file ModelMapObjectBinding.java.

◆ setModel()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setModel ( com.navigine.model.ModelProvider model)
inline

Sets the 3D asset (OBJ source + texture ImageProvider).

Parameters
modelModel 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")

Reimplemented from com.navigine.idl.java.ModelMapObject.

Definition at line 42 of file ModelMapObjectBinding.java.

◆ setPosition()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setPosition ( LocationPoint point)
inline

Sets the anchor position of the model in metric coordinates.

Parameters
pointCenter / placement point LocationPoint.
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")

Reimplemented from com.navigine.idl.java.ModelMapObject.

Definition at line 28 of file ModelMapObjectBinding.java.

◆ setPositionAnimated()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setPositionAnimated ( LocationPoint point,
float duration,
AnimationType type )
inline

Animates the model anchor to a new position.

Parameters
pointTarget metrics coordinates LocationPoint.
durationAnimation duration in seconds.
typeAnimation easing AnimationType.
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")

Reimplemented from com.navigine.idl.java.ModelMapObject.

Definition at line 35 of file ModelMapObjectBinding.java.

◆ setPriority()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setPriority ( float priority)
inline

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)}")

Reimplemented from com.navigine.idl.java.ModelMapObject.

Definition at line 84 of file ModelMapObjectBinding.java.

◆ setSize()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setSize ( float width,
float height )
inline

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")

Reimplemented from com.navigine.idl.java.ModelMapObject.

Definition at line 49 of file ModelMapObjectBinding.java.

◆ setTitle()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setTitle ( String title)
inline

Method is used to set the title of the map object.

Parameters
titleThe title to display on the location view.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set title
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")

Reimplemented from com.navigine.idl.java.MapObject.

Definition at line 135 of file ModelMapObjectBinding.java.

◆ setVisible()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setVisible ( boolean visible)
inline

Method is used to specify the visibility of the map object.

Parameters
visibleSpecifies whether the object is visible (true) or hidden (false). Default: true.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set visibility
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")

Reimplemented from com.navigine.idl.java.MapObject.

Definition at line 114 of file ModelMapObjectBinding.java.


The documentation for this class was generated from the following file: