VehicleRestriction
public struct VehicleRestriction : HorizonElement
Describes vehicle restrictions on the horizon element.
This class 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 VehicleRestriction 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.-
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
idThe unique ID of the horizon element.
pathIDThe id of the path to which this element belongs.
startOffsetIndicates the start offset along the path this data applies to.
endOffsetIndicates the end offset along the path this data applies to.
restrictionsA list of vehicle restrictions.
-
Data for a single vehicle restriction.
See moreDeclaration
Swift
public struct RestrictionData
-
Supported vehicle restriction types.
See moreDeclaration
Swift
public enum RestrictionType
-
Restricted vehicle types.
See moreDeclaration
Swift
public enum RestrictedVehicleType -
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]
VehicleRestriction Structure Reference