HorizonPath

public struct HorizonPath : Equatable

Path in the horizon. The length of the path as well as which types of horizon elements it contains are determined by the horizon options.

Important

This is a Public Preview API. It may be changed or removed at any time.

Lifecycle

Public

  • Identifier of this path.

    Declaration

    Swift

    public let pathID: Int
  • Identifier of the parent path (0 if there is no parent path).

    Declaration

    Swift

    public let parentPathID: Int
  • Offset on the parent path of the stub where this path starts. (nil if there is no parent path).

    Declaration

    Swift

    public let offsetOnParentPath: Measurement<UnitLength>?
  • Map of horizon elements on the path.

    Declaration

    Swift

    public let horizonElements: [HorizonElementType : [HorizonElement]]
  • Path geometry.

    Declaration

    Swift

    public let pathGeometry: [PathGeometry]
  • Declaration

    Swift

    public static func == (lhs: HorizonPath, rhs: HorizonPath) -> Bool
  • Returns all the horizon elements that belong to this path. Elements of the same type are provided in increasing order of the start and end offsets.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public func getElements() -> [HorizonElement]

    Return Value

    Array of horizon elements that belong to this path.

  • Returns all the horizon elements of the specified types that belong to this path. Elements of the same type are provided in increasing order of the start offset and end offset.

    • types Types of horizon elements to return.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public func getElements(types: [HorizonElementType]) -> [HorizonElement]

    Return Value

    Array of horizon elements of the given types that belong to this path.

  • Returns all the horizon elements of the specified type that belong to this path. The elements are provided in increasing order of the start offset and end offset.

    • type Type of horizon elements to return.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public func getElements(type: HorizonElementType) -> [HorizonElement]

    Return Value

    Array of horizon elements of the given types that belong to this path.