OrbitLocationCameraController Class

  • OrbitLocationCameraController
  • class Esri::ArcGISRuntime::OrbitLocationCameraController

    A camera controller that supports orbital camera navigation around a stationary point in a SceneView. More...

    Header: #include <OrbitLocationCameraController.h>
    Since: Esri::ArcGISRuntime 100.1
    Inherits: Esri::ArcGISRuntime::CameraController

    Public Functions

    OrbitLocationCameraController(const Esri::ArcGISRuntime::Point &point, double distance, QObject *parent = nullptr)
    OrbitLocationCameraController(const Esri::ArcGISRuntime::Point &targetPoint, const Esri::ArcGISRuntime::Point &cameraPoint, QObject *parent = nullptr)
    virtual ~OrbitLocationCameraController() override
    double cameraDistance() const
    double cameraHeadingOffset() const
    double cameraPitchOffset() const
    bool isCameraDistanceInteractive() const
    bool isCameraHeadingOffsetInteractive() const
    bool isCameraPitchOffsetInteractive() const
    double maxCameraDistance() const
    double maxCameraHeadingOffset() const
    double maxCameraPitchOffset() const
    double minCameraDistance() const
    double minCameraHeadingOffset() const
    double minCameraPitchOffset() const
    QFuture<bool> moveCameraAsync(double distanceDelta, double headingDelta, double pitchDelta, float duration)
    void setCameraDistance(double distance)
    void setCameraDistanceInteractive(bool interactiveDistance)
    void setCameraHeadingOffset(double cameraHeadingOffset)
    void setCameraHeadingOffsetInteractive(bool interactiveHeadingOffset)
    void setCameraPitchOffset(double cameraPitchOffset)
    void setCameraPitchOffsetInteractive(bool interactivePitchOffset)
    void setMaxCameraDistance(double maxDistance)
    void setMaxCameraHeadingOffset(double maxHeadingOffset)
    void setMaxCameraPitchOffset(double maxPitchOffset)
    void setMinCameraDistance(double minDistance)
    void setMinCameraHeadingOffset(double minHeadingOffset)
    void setMinCameraPitchOffset(double minPitchOffset)
    Esri::ArcGISRuntime::Point targetLocation() const

    Signals

    Detailed Description

    An orbit camera controller locks navigation around a target point. The camera can orbit around the target point but always focuses directly on the point. To activate the controller, set the controller on the SceneView::cameraController property. In this mode, the user can rotate around and zoom in and out from the target point. Once you have applied this camera controller to a SceneView, you cannot change the targetLocation nor the viewpoint of the scene view.

    See also OrbitGeoElementCameraController and GlobeCameraController.

    Member Function Documentation

    OrbitLocationCameraController::OrbitLocationCameraController(const Esri::ArcGISRuntime::Point &point, double distance, QObject *parent = nullptr)

    Creates an orbit camera controller object with the given target point and distance from that point.

    • point - The Point for the camera to focus on.
    • distance - Distance from the point at which the camera will be placed.
    • parent - The optional parent QObject.

    The orbit camera controller locks navigation around a target point. When this camera controller is applied, using SceneView::cameraController, navigation interaction always focuses on the target point object. In this mode, the user can rotate around and zoom in and out from the point. Once specified, the target point cannot be changed.

    [since Esri::ArcGISRuntime 100.3] OrbitLocationCameraController::OrbitLocationCameraController(const Esri::ArcGISRuntime::Point &targetPoint, const Esri::ArcGISRuntime::Point &cameraPoint, QObject *parent = nullptr)

    Create an orbit camera controller object with a target point and a camera point.

    • targetPoint - A Point which will be the focus of the camera.
    • cameraPoint - A Point which is where the camera is located.
    • parent - The optional parent QObject.

    The orbit camera controller calculates the distance of the camera from the target point and locks navigation around that target point. When this camera controller is applied, using SceneView::cameraController, navigation interaction always focuses on the target point object. In this mode, the user can rotate around and zoom in and out from the point. Once specified, the target point cannot be changed.

    This function was introduced in Esri::ArcGISRuntime 100.3.

    [override virtual] OrbitLocationCameraController::~OrbitLocationCameraController()

    Destructor.

    double OrbitLocationCameraController::cameraDistance() const

    Returns the distance from the camera to the targetLocation, in meters.

    The camera position and orientation is derived from this distance plus any camera offsets.

    See also setCameraDistance().

    [signal] void OrbitLocationCameraController::cameraDistanceChanged()

    Signal emitted when the distance from the camera to the target is changed.

    double OrbitLocationCameraController::cameraHeadingOffset() const

    Returns the heading of the camera relative to the targetLocation, in degrees.

    The clockwise angle in the horizontal plane of the targetLocation starting from due south. Any angle in degrees is valid and will automatically be normalized between -180 to 180. Defaults to 0 degrees.

    See also setCameraHeadingOffset().

    [signal] void OrbitLocationCameraController::cameraHeadingOffsetChanged()

    Signal emitted when the heading offset from the camera to the target is changed.

    double OrbitLocationCameraController::cameraPitchOffset() const

    Returns the pitch of the camera relative to the targetLocation, in degrees.

    The anti-clockwise angle from the positive Z axis through the targetLocation to the target's horizontal plane. Any angle in degrees is valid and will automatically be normalized between 0 and 180. Defaults to 45 degrees.

    See also setCameraPitchOffset().

    [signal] void OrbitLocationCameraController::cameraPitchOffsetChanged()

    Signal emitted when the pitch offset from the camera to the target is changed.

    bool OrbitLocationCameraController::isCameraDistanceInteractive() const

    Returns true if the camera's distance to the targetLocation can be changed by a user zoom interaction, false otherwise.

    When enabled, the user can change the cameraDistance with a zoom interaction. Defaults to true.

    bool OrbitLocationCameraController::isCameraHeadingOffsetInteractive() const

    Returns true if the camera's heading relative to the targetLocation can be changed by a user horizontal pan interaction, false otherwise.

    When enabled, the user can change the cameraHeadingOffset with a horizontal pan interaction. Defaults to true.

    bool OrbitLocationCameraController::isCameraPitchOffsetInteractive() const

    Returns true if the camera's pitch relative to the targetLocation can be changed by a user's vertical pan interaction, false otherwise.

    When enabled, the user can change the cameraPitchOffset with a vertical pan interaction. Defaults to true.

    double OrbitLocationCameraController::maxCameraDistance() const

    Returns the maximum distance from the camera to the targetLocation, in meters.

    The value must be greater than minCameraDistance. Serves as the maximum value for cameraDistance. Animations and interactions obey this limit. No limit on this maximum distance.

    See also setMaxCameraDistance().

    double OrbitLocationCameraController::maxCameraHeadingOffset() const

    Returns the maximum camera heading offset relative to the targetLocation, in degrees.

    The value must be greater than minCameraHeadingOffset. Serves as the maximum value for cameraHeadingOffset. Animations and interactions obey this limit. Defaults to 180.

    See also setMaxCameraHeadingOffset().

    double OrbitLocationCameraController::maxCameraPitchOffset() const

    Returns the maximum camera pitch offset relative to the targetLocation, in degrees.

    The value must be greater than minCameraPitchOffset but no greater than 90. Serves as the maximum value for cameraPitchOffset. Animations and interactions obey this limit. Defaults to 90.

    See also setMaxCameraPitchOffset().

    double OrbitLocationCameraController::minCameraDistance() const

    Returns the minimum distance from the camera to the targetLocation, in meters.

    The value cannot be negative. Serves as the minimum value for cameraDistance. Animations and interactions obey this limit. Defaults to 0.

    See also setMinCameraDistance().

    double OrbitLocationCameraController::minCameraHeadingOffset() const

    Returns the minimum camera heading offset relative to the targetLocation, in degrees.

    The value must be less than maxCameraHeadingOffset. Serves as the minimum value for cameraHeadingOffset. Animations and interactions obey this limit. Defaults to -180.

    See also setMinCameraHeadingOffset().

    double OrbitLocationCameraController::minCameraPitchOffset() const

    Returns the minimum camera pitch offset relative to the targetLocation, in degrees.

    The value must be less than maxCameraPitchOffset but no less than -90. Serves as the minimum value for cameraPitchOffset. Animations and interactions obey this limit. Defaults to -90.

    See also setMinCameraPitchOffset().

    [since Esri::ArcGISRuntime 200.2] QFuture<bool> OrbitLocationCameraController::moveCameraAsync(double distanceDelta, double headingDelta, double pitchDelta, float duration)

    Animates the camera to a new offset position relative to the target with the specified duration.

    • distanceDelta - The change in distance to apply in the animation.
    • headingDelta - The change in heading to apply in the animation.
    • pitchDelta - The change in pitch to apply in the animation.
    • duration - The duration of the animation in seconds.

    The heading and pitch delta values may be greater than 360 degrees and the angle is not normalized. For example, a heading delta of 720 will make the camera do two circles around the target within the duration time.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    void OrbitLocationCameraController::setCameraDistance(double distance)

    Sets the cameraDistance to distance.

    See also cameraDistance.

    void OrbitLocationCameraController::setCameraDistanceInteractive(bool interactiveDistance)

    Sets the cameraDistanceInteractive to interactiveDistance.

    See also isCameraDistanceInteractive.

    void OrbitLocationCameraController::setCameraHeadingOffset(double cameraHeadingOffset)

    Sets the cameraHeadingOffset to cameraHeadingOffset.

    See also cameraHeadingOffset.

    void OrbitLocationCameraController::setCameraHeadingOffsetInteractive(bool interactiveHeadingOffset)

    Sets the cameraHeadingOffsetInteractive to interactiveHeadingOffset.

    See also isCameraHeadingOffsetInteractive.

    void OrbitLocationCameraController::setCameraPitchOffset(double cameraPitchOffset)

    Sets the cameraPitchOffset to cameraPitchOffset.

    See also cameraPitchOffset.

    void OrbitLocationCameraController::setCameraPitchOffsetInteractive(bool interactivePitchOffset)

    Sets the cameraPitchOffsetInteractive to interactivePitchOffset.

    See also isCameraPitchOffsetInteractive.

    void OrbitLocationCameraController::setMaxCameraDistance(double maxDistance)

    Sets the maxCameraDistance to maxDistance.

    See also maxCameraDistance.

    void OrbitLocationCameraController::setMaxCameraHeadingOffset(double maxHeadingOffset)

    Sets the maxCameraHeadingOffset to maxHeadingOffset.

    See also maxCameraHeadingOffset.

    void OrbitLocationCameraController::setMaxCameraPitchOffset(double maxPitchOffset)

    Sets the maxCameraPitchOffset to maxPitchOffset.

    See also maxCameraPitchOffset.

    void OrbitLocationCameraController::setMinCameraDistance(double minDistance)

    Sets the minCameraDistance to minDistance.

    See also minCameraDistance.

    void OrbitLocationCameraController::setMinCameraHeadingOffset(double minHeadingOffset)

    Sets the minCameraHeadingOffset to minHeadingOffset.

    See also minCameraHeadingOffset.

    void OrbitLocationCameraController::setMinCameraPitchOffset(double minPitchOffset)

    Sets the minCameraPitchOffset to minPitchOffset.

    See also minCameraPitchOffset.

    Esri::ArcGISRuntime::Point OrbitLocationCameraController::targetLocation() const

    Returns the location on which the camera focuses and around which it orbits.

    The target location is the focal point of the camera managed by the orbit camera controller. The position of the camera is determined by the cameraDistance, cameraHeadingOffset, and cameraPitchOffset relative to this location.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.