PathGeometryElement
public struct PathGeometryElement : HorizonElement
Describes path geometry of the HorizonElement
.
To receive such elements in the HorizonSnapshot
, specify HorizonElementType
.pathGeometryType
in the HorizonOptions
that you register with the HorizonEngine
:
let horizonOptions = HorizonOptions(
id: UUID(),
elementTypes: [.pathGeometryType],
...
)
-
Initializes instance of
PathGeometryElement
.Declaration
Swift
public init( id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, coordinate: CLLocationCoordinate2D, altitude: Measurement<UnitLength>? )
-
Type of the element. Used to filter elements by type.
Declaration
Swift
public let elementType: HorizonElementType
-
Identifier of this element.
Declaration
Swift
public let id: Int
-
Identifier of the
HorizonPath
to which this element belongs.Declaration
Swift
public let pathID: Int
-
Start offset on the
HorizonPath
.Declaration
Swift
public let startOffset: Measurement<UnitLength>
-
End offset on the
HorizonPath
.Declaration
Swift
public let endOffset: Measurement<UnitLength>
-
Coordinate of the geometry point.
Declaration
Swift
public let coordinate: CLLocationCoordinate2D
-
Altitude at the geometry point. Null if not available.
Declaration
Swift
public let altitude: Measurement<UnitLength>?