Loading...
Searching...
No Matches

Class is used for representing certain polygon within the location Polygon. More...

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

Inherits NSObject.

Instance Methods

(nonnull instancetype) - initWithPolygon:locationId:sublocationId:
 Default constructor for class NCLocationPolygon.
 

Class Methods

(nonnull instancetype) + locationPolygonWithPolygon:locationId:sublocationId:
 Factory method for class NCLocationPolygon.
 

Properties

NCPolygonpolygon
 Metrics polygon Polygon.
 
int32_t locationId
 location polygon location identifier.
 
int32_t sublocationId
 location polygon sublocation identifier.
 

Detailed Description

Class is used for representing certain polygon within the location Polygon.

Swift code snippet:

let ring = [
NCPoint(x: 1.0, y: 2.0),
NCPoint(x: 3.0, y: 4.0),
NCPoint(x: 5.0, y: 2.0),
]
let metricPolygon = NCPolygon(points: ring)
let locationPolygon = NCLocationPolygon(polygon: metricPolygon, locationId: 42, sublocationId: 7)
let polygonBack = locationPolygon.polygon
print("LocationPolygon location \‍(locationPolygon.locationId) sublocation \‍(locationPolygon.sublocationId) vertices \‍(polygonBack.points.count)")

Objective C code snippet:

NSArray<NCPoint *> *ring = @[
[[NCPoint alloc] initWithX:1.0 y:2.0],
[[NCPoint alloc] initWithX:3.0 y:4.0],
[[NCPoint alloc] initWithX:5.0 y:2.0],
];
NCPolygon *metricPolygon = [[NCPolygon alloc] initWithPoints:ring];
NCLocationPolygon *locationPolygon = [[NCLocationPolygon alloc] initWithPolygon:metricPolygon locationId:42 sublocationId:7];
NCPolygon *polygonBack = locationPolygon.polygon;
NSLog(@"LocationPolygon location %d sublocation %d vertices %lu",
(int)locationPolygon.locationId, (int)locationPolygon.sublocationId, (unsigned long)polygonBack.points.count);

Definition at line 27 of file NCLocationPolygon.h.

Method Documentation

◆ initWithPolygon:locationId:sublocationId:

- (nonnull instancetype) initWithPolygon: (nonnull NCPolygon *) polygon
locationId: (int32_t) locationId
sublocationId: (int32_t) sublocationId 

Default constructor for class NCLocationPolygon.

◆ locationPolygonWithPolygon:locationId:sublocationId:

+ (nonnull instancetype) locationPolygonWithPolygon: (nonnull NCPolygon *) polygon
locationId: (int32_t) locationId
sublocationId: (int32_t) sublocationId 

Factory method for class NCLocationPolygon.

Property Documentation

◆ locationId

- (int32_t) locationId
readnonatomicassign

location polygon location identifier.

Definition at line 55 of file NCLocationPolygon.h.

◆ polygon

- (NCPolygon*) polygon
readnonatomicassign

Metrics polygon Polygon.

Definition at line 48 of file NCLocationPolygon.h.

◆ sublocationId

- (int32_t) sublocationId
readnonatomicassign

location polygon sublocation identifier.

Definition at line 62 of file NCLocationPolygon.h.


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