Loading...
Searching...
No Matches

Class describing one node of the evaluated route. More...

#include <com/navigine/idl/objc/NCRouteNode.h>

Inherits NSObject.

Instance Methods

(nonnull instancetype) - initWithPoint:weight:distance:events:
 Default constructor for class NCRouteNode.
 

Class Methods

(nonnull instancetype) + routeNodeWithPoint:weight:distance:events:
 Factory method for class NCRouteNode.
 

Properties

NCLocationPointpoint
 Location point of this node.
 
float weight
 Route cost/weight value at this node.
 
float distance
 Distance from route start to this node (meters).
 
NSArray< NCRouteEvent * > * events
 Events associated with this node.
 

Detailed Description

Class describing one node of the evaluated route.

Referenced from RoutePath.

Definition at line 19 of file NCRouteNode.h.

Method Documentation

◆ initWithPoint:weight:distance:events:

- (nonnull instancetype) initWithPoint: (nonnull NCLocationPoint *) point
weight: (float) weight
distance: (float) distance
events: (nonnull NSArray< NCRouteEvent * > *) events 

Default constructor for class NCRouteNode.

◆ routeNodeWithPoint:weight:distance:events:

+ (nonnull instancetype) routeNodeWithPoint: (nonnull NCLocationPoint *) point
weight: (float) weight
distance: (float) distance
events: (nonnull NSArray< NCRouteEvent * > *) events 

Factory method for class NCRouteNode.

Property Documentation

◆ distance

- (float) distance
readnonatomicassign

Distance from route start to this node (meters).

Swift code snippet:

let distance = node.getDistance()
print("Node distance: \‍(distance) meters")

Objective C code snippet:

float distance = [node getDistance];
NSLog(@"Node distance: %f meters", distance);

Definition at line 80 of file NCRouteNode.h.

◆ events

- (NSArray<NCRouteEvent *>*) events
readnonatomicassign

Events associated with this node.

Swift code snippet:

let events = node.getEvents()
print("Node has \‍(events.count) events")
for event in events {
demonstrateRouteEventUsage(event)
}

Objective C code snippet:

NSArray<NCRouteEvent *> *events = [node getEvents];
NSLog(@"Node has %lu events", (unsigned long)events.count);
for (NCRouteEvent *event in events) {
[self demonstrateRouteEventUsage:event];
}

Definition at line 95 of file NCRouteNode.h.

◆ point

- (NCLocationPoint*) point
readnonatomicassign

Location point of this node.

Swift code snippet:

let point = node.getPoint()
demonstrateLocationPointUsage(point)

Objective C code snippet:

NCLocationPoint *point = [node getPoint];
[self demonstrateLocationPointUsage:point];

Definition at line 50 of file NCRouteNode.h.

◆ weight

- (float) weight
readnonatomicassign

Route cost/weight value at this node.

Swift code snippet:

let weight = node.getWeight()
print("Node weight: \‍(weight)")

Objective C code snippet:

float weight = [node getWeight];
NSLog(@"Node weight: %f", weight);

Definition at line 65 of file NCRouteNode.h.


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