TransformationMatrixCameraController

Support camera navigation by using TransformationMatrix. Transformation Matrix camera controller provides navigation by using TransformationMatrix to control the camera's location and rotation. You need to pass this object to all TransformationMatrixCameraController functions. This can be used with transformation matrices produced by AR APIs like ARKit and ARCore.

Since

200.1.0

See also

Constructors

Link copied to clipboard
constructor()

Creates a TransformationMatrixCameraController object. When the controller is set on the scene view using SceneView.cameraController, the interaction mode will change for the active navigation model and be located at the origin camera's location and point along its rotation. The default camera has no rotation and is located at 0,0,15e6 meters.

constructor(originCamera: Camera)

Creates a TransformationMatrixCameraController with a Camera to describe the original location. When the controller is set on the scene view using SceneView.cameraController, the interaction mode will change for the active navigation model and be located at the TransformationMatrix's location and point along its rotation.

Properties

Link copied to clipboard

Determines the clipping distance in meters around the TransformationMatrixCameraController.originCamera. The default is null. When the value is set to null, there is no enforced clipping distance and therefore no limiting of displayed data. Setting the value to 10.0 will only render data 10 meters around the TransformationMatrixCameraController.originCamera.

Link copied to clipboard
val originCamera: StateFlow<Camera>

The Camera that describes the original location. Setting a new TransformationMatrix on the TransformationMatrixCameraController will move the camera relative to the origin camera's location and orientation.

Link copied to clipboard

The TransformationMatrix describes the current Camera's location relative to the origin camera.

Link copied to clipboard
val translationFactor: StateFlow<Double>

Defaults to 1.0. This value will be multiplied into the TransformationMatrix property. Setting the value to 3 will cause position changes indicated by the transformation matrix property to be multiplied by 3. Note this does not affect Camera rotation.

Functions

Link copied to clipboard
fun setOriginCamera(originCamera: Camera)

Sets the value of the originCamera StateFlow property.

Link copied to clipboard
fun setTranslationFactor(translationFactor: Double)

Sets the value of the translationFactor StateFlow property.