A transformation matrix camera controller that supports camera navigation by using TransformationMatrix. More...
Header: | #include <TransformationMatrixCameraController.h> |
Since: | Esri::ArcGISRuntime 100.6 |
Inherits: | Esri::ArcGISRuntime::CameraController |
This class was introduced in Esri::ArcGISRuntime 100.6.
Public Functions
TransformationMatrixCameraController(const Esri::ArcGISRuntime::Camera &originCamera, QObject *parent = nullptr) | |
TransformationMatrixCameraController(QObject *parent = nullptr) | |
virtual | ~TransformationMatrixCameraController() override |
double | clippingDistance() const |
Esri::ArcGISRuntime::Camera | originCamera() const |
void | setClippingDistance(double clippingDistance) |
void | setOriginCamera(const Esri::ArcGISRuntime::Camera &originCamera) |
void | setTransformationMatrix(Esri::ArcGISRuntime::TransformationMatrix *transformationMatrix) |
void | setTranslationFactor(double translationFactor) |
Esri::ArcGISRuntime::TransformationMatrix * | transformationMatrix() const |
double | translationFactor() const |
Signals
void | originCameraChanged() |
void | translationFactorChanged() |
Detailed Description
Camera controllers can be applied to a SceneView to determine the camera interaction and navigation model.
The transformation matrix camera controller provides navigation by using a TransformationMatrix to control the camera's location and rotation. This class can be used with transformation matrices produced by AR APIs like ARKit and ARCore.
Member Function Documentation
TransformationMatrixCameraController::TransformationMatrixCameraController (const Esri::ArcGISRuntime::Camera &originCamera , QObject *parent = nullptr)
Constructs a TransformationMatrix camera controller 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 of the camera and point along its rotation.
- originCamera - All following movements will be relative to the origin camera's location.
- parent - An optional parent.
TransformationMatrixCameraController::TransformationMatrixCameraController (QObject *parent = nullptr)
Default constructor.
Create an TransformationMatrix camera controller object.
When a default-constructed TransformationMatrixCameraController is set on a 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)
at an altitude of 15e6 meters.
- parent - The optional parent.
[signal]
void TransformationMatrixCameraController::originCameraChanged ()
Emitted when the originCamera property changes.
[signal]
void TransformationMatrixCameraController::translationFactorChanged ()
Emitted when the translationFactor property changes.
[override virtual]
TransformationMatrixCameraController::~TransformationMatrixCameraController ()
Destructor.
double TransformationMatrixCameraController::clippingDistance () const
Gets clipping distance in meters around the originCamera.
The default is 0.0. When the value is set to 0.0, there is no enforced clipping distance and therefore no limiting of displayed data.
This function was introduced in Esri::ArcGISRuntime 100.7.
See also setClippingDistance().
Esri::ArcGISRuntime::Camera TransformationMatrixCameraController::originCamera () const
Gets the Camera that describes the original location.
The default camera has no rotation and is located at (0,0,15e6) meters.
See also setOriginCamera().
void TransformationMatrixCameraController::setClippingDistance (double clippingDistance )
Sets the clipping distance in meters around the originCamera to clippingDistance.
When the value is set to 0.0, 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 originCamera.
This function was introduced in Esri::ArcGISRuntime 100.7.
See also clippingDistance().
void TransformationMatrixCameraController::setOriginCamera (const Esri::ArcGISRuntime::Camera &originCamera )
Sets the Camera that describes the original location to originCamera.
Setting a new TransformationMatrix on the TransformationMatrixCameraController will move the camera relative to the origin camera's location and orientation.
See also originCamera().
void TransformationMatrixCameraController::setTransformationMatrix (Esri::ArcGISRuntime::TransformationMatrix *transformationMatrix )
Sets the TransformationMatrix to transformationMatrix.
The TransformationMatrix describes the current Camera's location relative to the origin camera.
See also transformationMatrix().
void TransformationMatrixCameraController::setTranslationFactor (double translationFactor )
Sets the translation factor to translationFactor.
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 the Camera rotation.
The value of translationFactor must be postive.
See also translationFactor().
Esri::ArcGISRuntime::TransformationMatrix *TransformationMatrixCameraController::transformationMatrix () const
Gets the TransformationMatrix that describes the current Camera's location relative to the origin camera.
The default value is a default constructed transformation matrix, using the values (0, 0, 0, 1) for x, y, z, w quaternion and (0, 0, 0) for x, y, z translations.
See also setTransformationMatrix().
double TransformationMatrixCameraController::translationFactor () const
Gets the translation factor.
The default value is 1.0
.
See also setTranslationFactor().