FreeCameraOptions(androidJvm)

Various options for accessing physical properties of the underlying camera entity. A direct access to these properties allows more flexible and precise controlling of the camera while also being fully compatible and interchangeable with CameraOptions. All fields are optional.

class FreeCameraOptions(androidJvm)

Functions

getNativePtr
Link copied to clipboard

Experimental feature. Do not use.

open fun getNativePtr(): Long
getOrientation
Link copied to clipboard

Get the orientation of the camera represented as a unit quaternion [x, y, z, w]. The default pose of the camera is such that the forward vector is looking up the -Z axis and the up vector is aligned with north orientation of the map: forward: [0, 0, -1] up: [0, -1, 0] right [1, 0, 0] With the w value as the real part of the complex number

open fun getOrientation(): Vec4
getPosition
Link copied to clipboard

Get the position of the camera in slightly modified web mercator coordinates - The size of 1 unit is the width of the projected world instead of the "mercator meter". Coordinate [0, 0, 0] is the north-west corner and [1, 1, 0] is the south-east corner. - Z coordinate is conformal and must respect minimum and maximum zoom values. - Zoom is automatically computed from the altitude (z)

open fun getPosition(): Vec3
lookAtPoint
Link copied to clipboard

Helper function for setting orientation of the camera by defining a focus point. Elevation of 0.0 is used and no up vector.

open fun lookAtPoint(location: Point)

Helper function for setting orientation of the camera by defining a focus point. No up vector is used.

open fun lookAtPoint(location: Point, altitude: Double)

Helper function for setting orientation of the camera by defining a focus point. Up vector is required in certain scenarios where bearing can't be deduced from the viewing direction.

open fun lookAtPoint(location: Point, altitude: Double, upVector: Vec3)
setLocation
Link copied to clipboard

Helper function for setting the mercator position as Lat&Lng and altitude in meters

open fun setLocation(location: Point, altitude: Double)
setOrientation
Link copied to clipboard

Set the orientation of the camera represented as a unit quaternion [x, y, z, w]. The default pose of the camera is such that the forward vector is looking up the -Z axis and the up vector is aligned with north orientation of the map: forward: [0, 0, -1] up: [0, -1, 0] right [1, 0, 0] With the w value as the real part of the complex number Orientation can be set freely but certain constraints still apply - Orientation must be representable with only pitch and bearing. - Pitch has an upper limit

open fun setOrientation(orientation: Vec4)
setPitchBearing
Link copied to clipboard

Helper function for setting the orientation of the camera as a pitch and a bearing.

open fun setPitchBearing(pitch: Double, bearing: Double)
setPosition
Link copied to clipboard

Set the position of the camera in slightly modified web mercator coordinates - The size of 1 unit is the width of the projected world instead of the "mercator meter". Coordinate [0, 0, 0] is the north-west corner and [1, 1, 0] is the south-east corner. - Z coordinate is conformal and must respect minimum and maximum zoom values. - Zoom is automatically computed from the altitude (z)

open fun setPosition(position: Vec3)