HorizonEngine
@RestrictToExtendedFlavor(value = [ExternalScope.LIBRARY_GROUP] )
Interface to a Virtual Horizon engine.
To register a set of horizon options, call the registerHorizonOptions function:
horizonEngine.registerHorizonOptions(horizonOptions1)
horizonEngine.registerHorizonOptions(horizonOptions2)Content copied to clipboard
To unregister a set of horizon options, call the unregisterHorizonOptions function:
horizonEngine.registerHorizonOptions(horizonOptions1)
horizonEngine.registerHorizonOptions(horizonOptions2)
...
horizonEngine.unregisterHorizonOptions(horizonOptions2)Content copied to clipboard
To generate horizon results for specific sets of options, call the generateHorizon function:
horizonEngine.registerHorizonOptions(horizonOptions1)
horizonEngine.registerHorizonOptions(horizonOptions2)
horizonEngine.registerHorizonOptions(horizonOptions3)
...
val horizonResults = generateHorizon(
options = listOf(horizonOptions1, horizonOptions3),
navigationSnapshot = navigationSnapshot
)
horizonResults.forEach { result ->
val options = result.options
val snapshot = result.snapshot
val position = result.position
...
}Content copied to clipboard
Functions
Link copied to clipboard
abstract fun generateHorizon(options: List<HorizonOptions>, navigationSnapshot: NavigationSnapshot): List<HorizonResult>
Provides horizon data for the given location, based on a list of registered sets of horizon options.
Link copied to clipboard
Registers a set of horizon options. These options define the extent of the paths on the horizon and the map attributes that are collected for these paths.
Link copied to clipboard
Unregisters a previously registered set of horizon options. If the options set was not previously registered, the engine returns immediately.