OrbitGeoElementCameraController

A camera controller that supports orbital camera navigation around a stationary or moving GeoElement. This camera controller is used to associate camera navigation and movement with GeoElement objects, such as Graphic, Feature, and DynamicEntity. When this controller is set on the scene view, the interaction mode allows the user to rotate around and zoom in and out from the OrbitGeoElementCameraController.targetGeoElement. If the object is moving, the camera moves in synchronization with it and the camera position, heading, pitch and roll automatically adjusts. If the GeoElement geometry is a polyline or a polygon, the camera will focus on its center point. Once you have applied this camera controller to a SceneView, you cannot change the OrbitGeoElementCameraController.targetGeoElement nor the viewpoint of the scene view.

Since

200.1.0

See also

Constructors

Link copied to clipboard
constructor(targetGeoElement: GeoElement, distance: Double)

Creates an OrbitGeoElementCameraController using a distance to the specified GeoElement. This camera controller is used to associate camera navigation and movement with GeoElement objects, such as Graphic, Feature, and DynamicEntity. When the controller is set on the scene view, using SceneView.cameraController, the interaction mode allows the user to rotate around and zoom in and out from the object. For a moving object, the camera will move in synchronization with it and the camera position, heading, pitch and roll will automatically adjust. If the GeoElement geometry is a polyline or a polygon, the camera will focus on its center point.

Properties

Link copied to clipboard
val cameraDistance: StateFlow<Double>

The distance from the target object to the camera.

Link copied to clipboard
val cameraHeadingOffset: StateFlow<Double>

The heading of the camera relative to the target object.

Link copied to clipboard
val cameraPitchOffset: StateFlow<Double>

The pitch of the camera relative to the target object.

Link copied to clipboard

True if the camera heading offset is updated with the target's heading, false otherwise. If true, the camera will maintain its heading offset when the target's heading changes. Otherwise, the camera position is not affected by the target's heading. The default value is true.

Link copied to clipboard

True if the camera pitch offset is updated with the target's pitch, false otherwise. If true, the camera will maintain its pitch offset when the target's pitch changes. Otherwise, the camera position is not affected by the target's pitch. The default value is true.

Link copied to clipboard

True if the camera roll offset is updated with the target's roll, false otherwise. If true, the camera will maintain its roll offset when the target's roll changes. Otherwise, the camera position is not affected by the target's roll. The default value is true.

Link copied to clipboard

True if a zoom interaction can affect the camera distance, false otherwise. If true, the user can interactively change the distance between the camera and the target object. The default value is true.

Link copied to clipboard

True if a horizontal pan interaction can affect the camera heading offset, false otherwise. If true, the user can interactively change the relative heading between the camera and the target object. The default value is true.

Link copied to clipboard

True if a vertical pan interaction can affect the camera pitch offset, false otherwise. If true, the user can interactively change the relative pitch between the camera and the target object. The default value is true.

Link copied to clipboard

The maximum distance from the camera to the target, in meters. There is no limit on the maximum distance. Animations and interactions are bounded by this limit.

Link copied to clipboard

The maximum camera heading offset relative to the target's GeoElement, in degrees. Any angle, positive or negative, will be wrapped to a clockwise angle between 0 and 360. The value must be greater than OrbitGeoElementCameraController.minCameraHeadingOffset. Animations and interactions are bounded by this limit. The default value is 180.

Link copied to clipboard

The maximum camera pitch offset relative to the target's GeoElement, in degrees. The angle must be between OrbitGeoElementCameraController.minCameraPitchOffset and 90. Animations and interactions are bounded by this limit. The default value is 90.

Link copied to clipboard

The minimum distance from the camera to the target, in meters. Must be greater than 0. Animations and interactions are bounded by this limit. The default value is 0.

Link copied to clipboard

The minimum camera heading offset relative to the target's GeoElement, in degrees. Any angle, positive or negative, will be wrapped to a clockwise angle between 0 and 360. The value must be less than OrbitGeoElementCameraController.maxCameraHeadingOffset. Animations and interactions are bounded by this limit. The default value is -180.

Link copied to clipboard

The minimum camera pitch offset relative to the target's GeoElement, in degrees. The angle must be between -90 and OrbitGeoElementCameraController.maxCameraPitchOffset. Animations and interactions are bounded by this limit. The default value is -90.

Link copied to clipboard

The target geo element of the orbit camera controller. The target GeoElement for the camera to follow and look at. When the target moves, the camera will move with the target to maintain its relative position. To update the target's heading, pitch, and roll, you must use a Renderer and the GeoElement attributes.

Link copied to clipboard

The offset of the target focus point relative to the OrbitGeoElementCameraController.targetGeoElement along its X axis in the symbol coordinate system. By default, the camera focuses on the center point of the OrbitGeoElementCameraController.targetGeoElement geometry. The default value is 0.

Link copied to clipboard

The offset of the target focus point relative to the OrbitGeoElementCameraController.targetGeoElement along its Y axis in the symbol coordinate system. By default, the camera focuses on the center point of the OrbitGeoElementCameraController.targetGeoElement geometry. The default value is 0.

Link copied to clipboard

The offset of the target focus point relative to the OrbitGeoElementCameraController.targetGeoElement along its Z axis in the symbol coordinate system. By default, the camera focuses on the center point of the OrbitGeoElementCameraController.targetGeoElement geometry. The default value is 0.

Link copied to clipboard

The target screen vertical factor of the orbit camera controller. Controls the vertical position of the target on the screen. Allowed values are 0 (bottom of screen) to 1 (top). The default value is 0.5 (centered vertically).

Functions

Link copied to clipboard
suspend fun moveCamera(distanceDelta: Double, headingDelta: Double, pitchDelta: Double, duration: Float): Result<Boolean>

Animates the camera to a new position relative to the target.

Link copied to clipboard
fun setCameraDistance(cameraDistance: Double)

Sets the value of the cameraDistance StateFlow property.

Link copied to clipboard
fun setCameraHeadingOffset(cameraHeadingOffset: Double)

Sets the value of the cameraHeadingOffset StateFlow property.

Link copied to clipboard
fun setCameraPitchOffset(cameraPitchOffset: Double)

Sets the value of the cameraPitchOffset StateFlow property.

Link copied to clipboard
suspend fun setTargetOffsets(x: Double, y: Double, z: Double, duration: Float): Result<Boolean>

Animates the camera to a new position using the target offsets of the camera. By default the camera focuses on the target's geometry center point. Using the offsets you can move the focal point to a new position relative to that center point.