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 (GlobalPoint point, Integer sublocationId)
 Sets the anchor position of the model in WGS84 coordinates.
 
boolean setPositionAnimated (GlobalPoint point, Integer sublocationId, 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 radians (around the placement axis used by the engine).
 
boolean setAngleAnimated (float angle, float duration, AnimationType type)
 Animates rotation to the given angle in radians.
 
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 setTitleWithStyle (String title, TitleStyle style)
 Method is used to set the title and its style for the map object.
 
boolean setAlpha (float alpha)
 Method is used to set the opacity of the map object.
 

Detailed Description

Definition at line 14 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 108 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 94 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 101 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 150 of file ModelMapObjectBinding.java.

◆ setAngle()

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

Sets rotation angle in radians (around the placement axis used by the engine).

Parameters
angleRotation angle in radians. Default: 0.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

boolean angleOk = modelMapObject.setAngle((float) Math.toRadians(45.0));
System.out.println("Model setAngle: " + angleOk);

Kotlin code snippet:

println("Model setAngle: ${m.setAngle(Math.toRadians(45.0).toFloat())}")

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

Definition at line 64 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 in radians.

Parameters
angleRotation angle in radians.
durationAnimation duration in seconds.
typeAnimation type AnimationType.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

boolean angleAnimOk = modelMapObject.setAngleAnimated((float) Math.toRadians(90.0), 0.5f, AnimationType.QUINT);
System.out.println("Model setAngleAnimated: " + angleAnimOk);

Kotlin code snippet:

println("Model setAngleAnimated: ${m.setAngleAnimated(Math.toRadians(90.0).toFloat(), 0.5f, AnimationType.QUINT)}")

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

Definition at line 71 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 78 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 57 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 129 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 122 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 43 of file ModelMapObjectBinding.java.

◆ setPosition()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setPosition ( GlobalPoint point,
Integer sublocationId )
inline

Sets the anchor position of the model in WGS84 coordinates.

Parameters
pointCenter / placement point GlobalPoint.
sublocationIdFloor this object is attached to, or null for the outdoor map.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

GlobalPoint modelPoint = new GlobalPoint(12.0, 34.0);
boolean posOk = modelMapObject.setPosition(modelPoint, 7);
System.out.println("Model setPosition: " + posOk);

Kotlin code snippet:

val posOk = m.setPosition(GlobalPoint(12.0, 34.0))
println("Model setPosition: $posOk")

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

Definition at line 29 of file ModelMapObjectBinding.java.

◆ setPositionAnimated()

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

Animates the model anchor to a new position.

Parameters
pointTarget WGS84 coordinates GlobalPoint.
sublocationIdFloor this object is attached to, or null for the outdoor map.
durationAnimation duration in seconds.
typeAnimation easing AnimationType.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

boolean posAnimOk = modelMapObject.setPositionAnimated(new GlobalPoint(15.0, 40.0), 7, 0.5f, AnimationType.SINE);
System.out.println("Model setPositionAnimated: " + posAnimOk);

Kotlin code snippet:

val posAnimOk = m.setPositionAnimated(GlobalPoint(15.0, 40.0), 0.5f, AnimationType.SINE)
println("Model setPositionAnimated: $posAnimOk")

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

Definition at line 36 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 85 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 50 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 136 of file ModelMapObjectBinding.java.

◆ setTitleWithStyle()

boolean com.navigine.idl.java.internal.ModelMapObjectBinding.setTitleWithStyle ( String title,
TitleStyle style )
inline

Method is used to set the title and its style for the map object.

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

Java code snippet:

// Set title with style
boolean titleStyleSuccess = circleMapObject.setTitleWithStyle("Styled Circle", titleStyle);
System.out.println("Set circle title with style: " + titleStyleSuccess);

Kotlin code snippet:

// Set title with style
val titleStyleSuccess = circleMapObject!!.setTitleWithStyle("Styled Circle", titleStyle)
println("Set circle title with style: $titleStyleSuccess")

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

Definition at line 143 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 115 of file ModelMapObjectBinding.java.


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