ControlPoint
public struct ControlPoint : Equatable
The camera configuration for a given distance to the next instruction on the route. Intermediate values are obtained by linear interpolation between the corresponding points.
-
Creates a new
ControlPoint
instance.Declaration
Swift
public init(distance: Measurement<UnitLength>, tilt: Double, zoom: Double, fieldOfView: Double = 45)
Parameters
distance
Distance to the next route instruction from which the following camera configuration is applied.
tilt
Optional tilt to be applied to the camera when the corresponding distance is reached.
zoom
Zoom to be applied. Must be greater than zero.
fieldOfView
Optional field of view (FOV), in degrees, to be applied. By default, it is
45
.
-
Distance to the next route instruction from which the following camera configuration is applied. Its value must be greater than zero.
Declaration
Swift
public let distance: Measurement<UnitLength>
-
Optional tilt to be applied to the camera when the corresponding distance is reached. It must range from 0 to 90. If tilt is not provided, a tilt value of 0 is used.
Declaration
Swift
public let tilt: Double
-
Zoom to be applied. Its value must be greater than zero.
Declaration
Swift
public let zoom: Double
-
Optional field of view (FOV), in degrees, to be applied. This must be in the range from 1.0 to 150.0 (inclusive). If no value is provided, then the default value of 45.0 is used. The FoV used may be different from the entered value, depending on the camera scale:
- If the camera zoom is less than ~13.7, then the FoV value defined in the camera control point will be used.
- If the camera zoom is in the range [13.7..12.4], the FoV is adjusted to approach 45 degrees. The amount of adjustment increases proportionately with the camera scale. The FoV for a camera scale close to 12.4 will be adjusted to be close to 45 degrees. The FoV for a camera scale closer to 3.7 will have less adjustment applied to it.
- If the camera scale is greater than 12.4, the default value of 45 degrees for the field of view will be used.
Declaration
Swift
public let fieldOfView: Double