HorizonEngine
public protocol HorizonEngine
Defines the interface to the horizon engine.
The horizon engine generates virtual horizon data based on the previously registered horizon
options. These options define the length and the map data collected for the horizon paths.
The client of the horizon engine can register multiple sets of horizon options.
The client can also request the engine provide horizon data for all or some of the option sets.
The client of the engine can also update theHorizonOptions
by registering a new set of
options or unregistering a previously registered set.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Registers a set of horizon options. These options define the extent of the paths on the horizon and the map attributes that are collected about these paths.
Declaration
Swift
func registerHorizonOptions(options: HorizonOptions) throws
Parameters
options
Set of horizon options.
-
Unregisters a previously registered set of horizon options. If the options set was not previously registered then the engine reports a warning and returns immediately.
Declaration
Swift
func unregisterHorizonOptions(options: HorizonOptions) throws
Parameters
options
Previously registered set of
HorizonOptions
. -
Provides horizon data for the given location, based on a list of previously registered sets of horizon options.
Declaration
Swift
func generateHorizon( options: [HorizonOptions], navigationSnapshot: NavigationSnapshot ) throws -> [HorizonResult]
Parameters
options
List of previously registered sets of
HorizonOptions
.navigationSnapshot
NavigationSnapshot
of the current navigation session. The required location information is extracted from this navigation snapshot.Return Value
Array of
HorizonResult
data consisting of one horizon snapshot andHorizonPosition
and set ofHorizonOptions
. Provided that theregisterHorizonOptions
was previously called to register each set of horizon options. If a specific set of options was not previously registered, neither the horizon snapshot data nor the vehicle position is generated for that set. If none of the sets of options was previously registered, the function returns an empty array.