VehicleRestrictionElement

public struct VehicleRestrictionElement : HorizonElement

Describes vehicle restrictions on the horizon element.

This structure holds a horizon element with information regarding vehicle restriction. It contains information regarding type of vehicle restriction and flag indicating whether vehicle restriction is violated with current configuration.

To obtain VehicleRestrictionElement horizon elements, the integrator must create an instance of HorizonEngine, register HorizonOptions including elementTypes containing HorizonElementType .vehicleRestrictionType with a call to HorizonEngine .registerHorizonOptions, and request a HorizonResult using the previously registered HorizonOptions with a call to HorizonEngine .generateHorizon.

Important

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

Lifecycle

  • Creates a single instance of a horizon element that specifies vehicle restrictions.

    Declaration

    Swift

    public init(
        id: Int,
        pathID: Int,
        startOffset: Measurement<UnitLength>,
        endOffset: Measurement<UnitLength>,
        restrictions: [RestrictionData]
    )

    Parameters

    id

    The unique ID of the horizon element.

    pathID

    The id of the path to which this element belongs.

    startOffset

    Indicates the start offset along the path this data applies to.

    endOffset

    Indicates the end offset along the path this data applies to.

    restrictions

    A list of vehicle restrictions.

RestrictionData

RestrictionType

RestrictedVehicleType

  • Restricted vehicle types.

    See more

    Declaration

    Swift

    public enum RestrictedVehicleType
  • id

    The unique ID of the horizon element.

    Declaration

    Swift

    public let id: Int
  • The id of the path to which this element belongs.

    Declaration

    Swift

    public let pathID: Int
  • Indicates the start offset along the path this data applies to.

    Declaration

    Swift

    public let startOffset: Measurement<UnitLength>
  • Indicates the end offset along the path this data applies to.

    Declaration

    Swift

    public let endOffset: Measurement<UnitLength>
  • Type of the element. Used to filter elements by type.

    Declaration

    Swift

    public let elementType: HorizonElementType
  • A list of vehicle restrictions.

    Declaration

    Swift

    public let restrictions: [RestrictionData]