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

Public Member Functions

RoutePath head (float advance)
 Returns the leading segment of the route up to advance meters.
 
RoutePath tail (float advance)
 Returns the route segment after advance meters.
 
ArrayList< RouteNodenodes ()
 Returns route nodes with points and events.
 
float getLength ()
 Total route length in meters.
 
float getWeight ()
 Total route weight/cost.
 

Protected Member Functions

 RoutePathBinding (NativeObject nativeObject)
 

Detailed Description

Definition at line 12 of file RoutePathBinding.java.

Constructor & Destructor Documentation

◆ RoutePathBinding()

com.navigine.idl.java.internal.RoutePathBinding.RoutePathBinding ( NativeObject nativeObject)
inlineprotected

Invoked only from native code.

Definition at line 19 of file RoutePathBinding.java.

Member Function Documentation

◆ getLength()

float com.navigine.idl.java.internal.RoutePathBinding.getLength ( )
inline

Total route length in meters.

Returns

Java code snippet:

// Get route length
double length = path.getLength();
System.out.println("Route length: " + length + " meters");

Kotlin code snippet:

// Get route length
val length = path.length
println("Route length: $length meters")

Reimplemented from com.navigine.idl.java.RoutePath.

Definition at line 48 of file RoutePathBinding.java.

◆ getWeight()

float com.navigine.idl.java.internal.RoutePathBinding.getWeight ( )
inline

Total route weight/cost.

Returns

Java code snippet:

// Get total route weight
double weight = path.getWeight();
System.out.println("Route weight: " + weight);

Kotlin code snippet:

// Get total route weight
val weight = path.weight
println("Route weight: $weight")

Reimplemented from com.navigine.idl.java.RoutePath.

Definition at line 55 of file RoutePathBinding.java.

◆ head()

RoutePath com.navigine.idl.java.internal.RoutePathBinding.head ( float advance)
inline

Returns the leading segment of the route up to advance meters.

Parameters
advancedistance along route (meters).
Returns
route head segment.

Java code snippet:

// Get head of route (first 10 meters)
RoutePath headPath = path.head(10.0);
if (headPath != null) {
System.out.println("Head path length: " + headPath.getLength() + " meters");
}

Kotlin code snippet:

// Get head of route (first 10 meters)
val headPath = path.head(10.0)
headPath?.let {
println("Head path length: ${it.length} meters")
}

Reimplemented from com.navigine.idl.java.RoutePath.

Definition at line 27 of file RoutePathBinding.java.

◆ nodes()

ArrayList< RouteNode > com.navigine.idl.java.internal.RoutePathBinding.nodes ( )
inline

Returns route nodes with points and events.

Java code snippet:

// Get route nodes
List<RouteNode> nodes = path.getNodes();
System.out.println("Route has " + nodes.size() + " nodes");
for (RouteNode node : nodes) {
}

Kotlin code snippet:

// Get route nodes
val nodes = path.nodes
println("Route has ${nodes.size} nodes")
nodes.forEach { node ->
demonstrateRouteNodeUsage(node)
}

Reimplemented from com.navigine.idl.java.RoutePath.

Definition at line 41 of file RoutePathBinding.java.

◆ tail()

RoutePath com.navigine.idl.java.internal.RoutePathBinding.tail ( float advance)
inline

Returns the route segment after advance meters.

Parameters
advancedistance along route (meters).
Returns
route tail segment.

Java code snippet:

// Get tail of route (remaining after 10 meters)
RoutePath tailPath = path.tail(10.0);
if (tailPath != null) {
System.out.println("Tail path length: " + tailPath.getLength() + " meters");
}

Kotlin code snippet:

// Get tail of route (remaining after 10 meters)
val tailPath = path.tail(10.0)
tailPath?.let {
println("Tail path length: ${it.length} meters")
}

Reimplemented from com.navigine.idl.java.RoutePath.

Definition at line 34 of file RoutePathBinding.java.


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