VisionSafetyManager
public final class VisionSafetyManager
VisionSafetyManager
is an entry point to the high-level framework MapboxVisionSafety
focused on safety related tasks like collision and over speeding detection.
Depends on VisionManager
.
-
Fabric method for creating a
VisionSafetyManager
instance.Declaration
Swift
public static func create(visionManager: VisionManagerProtocol, delegate: VisionSafetyManagerDelegate? = nil) -> VisionSafetyManager
Parameters
visionManager
Instance of
VisionManager
.delegate
Delegate for
VisionSafetyManager
. Delegate is held as a strong reference untildestroy
is called.Return Value
Instance of
VisionSafetyManager
configured withVisionManager
instance and delegate. -
Cleanup the state and resources of
VisionSafetyManger
.Declaration
Swift
public func destroy()
-
Set sensitivity thresholds in seconds for collision with vehicles.
Declaration
Swift
public func setTimeToCollisionWithVehicle(warningTime: Float, criticalTime: Float)
Parameters
warningTime
Threshold in seconds for
CollisionDangerLevel.Warning
criticalTime
Threshold in seconds for
CollisionDangerLevel.Critical
-
Set minimal speed when collision system activates. Expressed in meters per second.
Declaration
Swift
public func setCollisionWithVehicleMinSpeed(minSpeed: Float)