OrbitLocationCameraController Class

  • OrbitLocationCameraController
  • class Esri::ArcGISRuntime::OrbitLocationCameraController

    Provides orbital camera navigation around a stationary or moving point object. More...

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

    This class was introduced in Esri::ArcGISRuntime 100.1.

    Public Functions

    OrbitLocationCameraController(const Esri::ArcGISRuntime::Point &targetPoint, const Esri::ArcGISRuntime::Point &cameraPoint, QObject *parent = nullptr)
    OrbitLocationCameraController(const Esri::ArcGISRuntime::Point &point, double distance, 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
    Esri::ArcGISRuntime::TaskWatcher moveCamera(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

    void cameraDistanceChanged()
    void cameraHeadingOffsetChanged()
    void cameraPitchOffsetChanged()
    void moveCameraCompleted(QUuid taskId, bool succeeded)

    Detailed Description

    Camera controllers can be applied to a SceneView to determine the camera interaction and navigation model.

    Setting this type as the CameraController for a SceneView will ensure that the camera is always focused on the targetLocation.

    Note: The points used for this type must be 3D - that is they must have a z value.

    Member Function Documentation

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

    Constructs an OrbitLocationCameraController with a specified target location and a camera location.

    • targetPoint - The location which will be the focus of the camera in the view.
    • cameraPoint - The location where the camera is located.
    • parent - An optional parent.

    This function was introduced in Esri::ArcGISRuntime 100.3.

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

    Constructs an OrbitLocationCameraController with a specified target location.

    • point - The location which will be the focus of the camera in the view.
    • distance - The distance (in meters) from the point the camera will be placed.
    • parent - An optional parent.

    [signal] void OrbitLocationCameraController::cameraDistanceChanged()

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

    [signal] void OrbitLocationCameraController::cameraHeadingOffsetChanged()

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

    [signal] void OrbitLocationCameraController::cameraPitchOffsetChanged()

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

    [signal] void OrbitLocationCameraController::moveCameraCompleted(QUuid taskId, bool succeeded)

    Signal emitted when a moveCamera operation is completed.

    • taskId - The task ID of the asynchronous task.
    • succeeded - Whether the operation was successful.

    [override virtual] OrbitLocationCameraController::~OrbitLocationCameraController()

    Destructor.

    double OrbitLocationCameraController::cameraDistance() const

    Get the distance from the target location to the camera in meters.

    See also setCameraDistance().

    double OrbitLocationCameraController::cameraHeadingOffset() const

    Get the heading offset of the camera, in degrees, relative to the target object.

    A heading of 0° indicates that the camera is positioned to the South of the target, looking North.

    See also setCameraHeadingOffset().

    double OrbitLocationCameraController::cameraPitchOffset() const

    Get the pitch offset of the camera, in degrees, relative to the target object.

    A pitch of 0° indicates that the camera is oriented along the z-axis, that is looking up towards the target object.

    See also setCameraPitchOffset().

    bool OrbitLocationCameraController::isCameraDistanceInteractive() const

    Returns whether user interactions are enabled supporting distance changes/zoom interactions.

    When true, the user may zoom towards and away from the targetLocation using mouse/touch interactions with the view.

    The default setting is true.

    bool OrbitLocationCameraController::isCameraHeadingOffsetInteractive() const

    Returns the interactive heading offset value indicating whether user interactions are enabled.

    When interactive heading offset is true the user is able to manually change the relative heading offset between the target focal point and the camera.

    The default setting is true

    bool OrbitLocationCameraController::isCameraPitchOffsetInteractive() const

    Returns the interactive pitch offset value indicating if user interactions are enabled.

    When interactive pitch offset is true the user is able to manually change the relative pitch offset between the target focal point and the camera.

    The default setting is true

    double OrbitLocationCameraController::maxCameraDistance() const

    Returns the maximum camera distance from the target in meters.

    See also setMaxCameraDistance().

    double OrbitLocationCameraController::maxCameraHeadingOffset() const

    Returns the maximum camera heading offset in degrees.

    See also setMaxCameraHeadingOffset().

    double OrbitLocationCameraController::maxCameraPitchOffset() const

    Returns the maximum camera pitch offset in degrees.

    See also setMaxCameraPitchOffset().

    double OrbitLocationCameraController::minCameraDistance() const

    Returns the minimum camera roll in meters.

    See also setMinCameraDistance().

    double OrbitLocationCameraController::minCameraHeadingOffset() const

    Returns the minimum camera heading offset in degrees.

    See also setMinCameraHeadingOffset().

    double OrbitLocationCameraController::minCameraPitchOffset() const

    Returns the minimum camera pitch offset in degrees.

    See also setMinCameraPitchOffset().

    Esri::ArcGISRuntime::TaskWatcher OrbitLocationCameraController::moveCamera(double distanceDelta, double headingDelta, double pitchDelta, float duration)

    Animate the camera to the new position relative to the target.

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

    The moveCameraCompleted signal emits when the operation is complete.

    void OrbitLocationCameraController::setCameraDistance(double distance)

    Set the distance from the target location to the camera in meters.

    • distance - The distance from the target in meters.

    This value must be greater than 0.

    See also cameraDistance().

    void OrbitLocationCameraController::setCameraDistanceInteractive(bool interactiveDistance)

    Enables user interactions for changing the distance/zoom between the camera and the target object.

    Set interactiveDistance to true to allow the user to zoom towards and away from the targetLocation using mouse/touch interactions with the view.

    See also isCameraDistanceInteractive().

    void OrbitLocationCameraController::setCameraHeadingOffset(double cameraHeadingOffset)

    Sets the heading offset of the camera, in degrees, relative to the target object.

    • cameraHeadingOffset - The heading offset of the camera in degrees.

    A heading of 0° indicates that the camera is positioned to the South of the target, looking North.

    See also cameraHeadingOffset().

    void OrbitLocationCameraController::setCameraHeadingOffsetInteractive(bool interactiveHeadingOffset)

    Enables user interactions for changing the heading offset between the camera and the target object.

    Set interactiveHeadingOffset to true to allow the user to interactively change the heading offset between the camera and the target object using mouse/touch interactions with the view.

    See also isCameraHeadingOffsetInteractive().

    void OrbitLocationCameraController::setCameraPitchOffset(double cameraPitchOffset)

    Sets the pitch offset of the camera relative to the target object.

    • cameraPitchOffset - The pitch offset of the camera relative to the target object in degrees.

    A pitch of 0° indicates that the camera is oriented along the z-axis, that is looking up towards the target object.

    See also cameraPitchOffset().

    void OrbitLocationCameraController::setCameraPitchOffsetInteractive(bool interactivePitchOffset)

    Enables user interactions for changing the pitch offset between the camera and the target object.

    Set interactivePitchOffset to true to allow the user to interactively change the pitch offset between the camera and the target object. object using mouse/touch interactions with the view.

    See also isCameraPitchOffsetInteractive().

    void OrbitLocationCameraController::setMaxCameraDistance(double maxDistance)

    Sets the maximum distance from the camera to the target in meters.

    • maxDistance - The new value for the maximum camera distance in meters.

    See also maxCameraDistance().

    void OrbitLocationCameraController::setMaxCameraHeadingOffset(double maxHeadingOffset)

    Sets the maximum camera heading offset in degrees.

    • maxHeadingOffset - The new value for the maximum camera heading offset in degrees.

    This value will be wrapped to a clockwise angle in the range: 0° to 360°.

    See also maxCameraHeadingOffset().

    void OrbitLocationCameraController::setMaxCameraPitchOffset(double maxPitchOffset)

    Sets the maximum camera pitch offset in degrees.

    • maxPitchOffset - The new value for the maximum camera pitch offset in degrees.

    This value must be in the range: minCameraPitchOffset to 90°.

    The default value is 90°.

    See also maxCameraPitchOffset().

    void OrbitLocationCameraController::setMinCameraDistance(double minDistance)

    Sets the minimum distance from the camera to the target.

    • minDistance - The new value for the minimum camera distance in meters.

    This value must be greater than 0.

    See also minCameraDistance().

    void OrbitLocationCameraController::setMinCameraHeadingOffset(double minHeadingOffset)

    Sets the minimum camera heading offset in degrees.

    • minHeadingOffset - The new value for the minimum camera heading offset in degrees.

    This value can be any value (positive or negative) and will be wrapped to a clockwise angle in the range: 0° to 360°.

    See also minCameraHeadingOffset().

    void OrbitLocationCameraController::setMinCameraPitchOffset(double minPitchOffset)

    Sets the minimum camera pitch offset in degrees.

    • minPitchOffset - The new value for the minimum camera pitch offset in degrees.

    This value must lie in the range: -90° to maxCameraPitchOffset. The default value is -90°.

    See also minCameraPitchOffset().

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

    Returns the target point location of the camera controller.

    The target determines the focal point of the camera managed by this OrbitLocationCameraController.

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