PathObject
Objective-C
@interface PathObject : NSObject
Swift
class PathObject : NSObject
This class encapsulates path information.
-
Initializes and returns a newly allocated object using the model data.
Declaration
Objective-C
- (nonnull instancetype)initWithModelData:(nonnull void *)data;
-
Returns the model data.
Declaration
Objective-C
- (nonnull void *)getModelData;
-
Initializes and returns a newly allocated object using the data buffer path of a given format.
Declaration
Objective-C
- (nonnull instancetype)initWithDataBuffer:(nonnull NSData *)data format:(PathFileFormat)format;
Swift
init(dataBuffer data: Data, format: PathFileFormat)
-
Initializes and returns a newly allocated object using the location array coordinates.
Declaration
Objective-C
- (nonnull instancetype)initWithCoordinates: (nonnull NSArray<CoordinatesObject *> *)coordinates;
Swift
init(coordinates: [CoordinatesObject])
-
Returns read-only access to the internal coordinates list.
Declaration
Objective-C
- (nonnull NSArray<CoordinatesObject *> *)getCoordinates;
Swift
func getCoordinates() -> [CoordinatesObject]
-
Returns read-only access to the internal waypoint list.
Declaration
Objective-C
- (nonnull NSArray<NSNumber *> *)getWayPoints;
Swift
func getWayPoints() -> [NSNumber]
-
Returns the path rectangle area.
Declaration
Objective-C
- (nullable RectangleGeographicAreaObject *)getArea;
Swift
func getArea() -> RectangleGeographicAreaObject?
-
Get path length.
Declaration
Objective-C
- (int)getLength;
Swift
func getLength() -> Int32
-
Returns the path name.
Declaration
Objective-C
- (nonnull NSString *)getName;
Swift
func getName() -> String
-
Set the path name.
Declaration
Objective-C
- (void)setName:(nonnull NSString *)name;
Swift
func setName(_ name: String)
-
Clone path from the given coordinate.
Declaration
Objective-C
- (nullable PathObject *)cloneStartEnd: (nonnull CoordinatesObject *)startLocation endLocation:(nonnull CoordinatesObject *)endLocation;
Swift
func cloneStartEnd(_ startLocation: CoordinatesObject, endLocation: CoordinatesObject) -> PathObject?
-
Clone reverse order path.
Declaration
Objective-C
- (nullable PathObject *)cloneReverse;
Swift
func cloneReverse() -> PathObject?
-
Export path coordinates in the requested data format.
Declaration
Objective-C
- (nullable NSData *)exportAs:(PathFileFormat)format;
Swift
func export(as format: PathFileFormat) -> Data?
Parameters
format
Data format, see PathFileFormat
-
Gets a coordinate on path from at the given percent.
Declaration
Objective-C
- (nullable CoordinatesObject *)getCoordinatesAtPercent:(double)percent;
Swift
func getCoordinatesAtPercent(_ percent: Double) -> CoordinatesObject?
Parameters
percent
Value between 0 and 1.