OrbitGeoElementCameraController Class

GeoElement."> OrbitGeoElementCameraController Class | ArcGISQtCpp
  • OrbitGeoElementCameraController
  • class Esri::ArcGISRuntime::OrbitGeoElementCameraController

    A camera controller that supports orbital camera navigation around a stationary or moving GeoElement. More...

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

    Public Functions

    OrbitGeoElementCameraController(Esri::ArcGISRuntime::GeoElement *geoElement, double distance, QObject *parent = nullptr)
    virtual ~OrbitGeoElementCameraController() override
    double cameraDistance() const
    double cameraHeadingOffset() const
    double cameraPitchOffset() const
    bool isAutoHeadingEnabled() const
    bool isAutoPitchEnabled() const
    bool isAutoRollEnabled() 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 setAutoHeadingEnabled(bool enabled)
    void setAutoPitchEnabled(bool enabled)
    void setAutoRollEnabled(bool enabled)
    void setCameraDistance(double distance)
    void setCameraDistanceInteractive(bool interactiveDistance)
    void setCameraHeadingOffset(double cameraHeading)
    void setCameraHeadingOffsetInteractive(bool interactiveHeading)
    void setCameraPitchOffset(double cameraPitch)
    void setCameraPitchOffsetInteractive(bool interactivePitch)
    void setMaxCameraDistance(double maxDistance)
    void setMaxCameraHeadingOffset(double maxHeading)
    void setMaxCameraPitchOffset(double maxPitch)
    void setMinCameraDistance(double minDistance)
    void setMinCameraHeadingOffset(double minHeading)
    void setMinCameraPitchOffset(double minPitch)
    void setTargetOffsetX(double offsetX)
    void setTargetOffsetY(double offsetY)
    void setTargetOffsetZ(double offsetZ)
    QFuture<bool> setTargetOffsetsAsync(double x, double y, double z, float duration)
    void setTargetVerticalScreenFactor(float verticalFactor)
    Esri::ArcGISRuntime::GeoElement *targetGeoElement() const
    double targetOffsetX() const
    double targetOffsetY() const
    double targetOffsetZ() const
    float targetVerticalScreenFactor() const

    Signals

    Detailed Description

    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 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 targetGeoElement nor the viewpoint of the scene view.

    See also OrbitLocationCameraController and GlobeCameraController.

    Member Function Documentation

    OrbitGeoElementCameraController::OrbitGeoElementCameraController(Esri::ArcGISRuntime::GeoElement *geoElement, double distance, QObject *parent = nullptr)

    Creates an OrbitGeoElementCameraController using a distance to the specified GeoElement.

    • geoElement - The GeoElement that will be the focus of the camera in the scene view.
    • distance - The distance in meters that the camera will be positioned from the GeoElement.
    • parent - The optional parent QObject.

    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.

    [override virtual] OrbitGeoElementCameraController::~OrbitGeoElementCameraController()

    Destructor.

    double OrbitGeoElementCameraController::cameraDistance() const

    Returns the distance from the target object to the camera.

    See also setCameraDistance().

    [signal] void OrbitGeoElementCameraController::cameraDistanceChanged()

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

    double OrbitGeoElementCameraController::cameraHeadingOffset() const

    Returns the heading of the camera relative to the target object.

    A clockwise angle in the target's horizontal plane starting from the heading of the target.

    For example, if the target has a heading of 45°,a heading offset of 10 for the camera controller indicates an effective compass bearing of 55°.

    The default is 0°.

    See also setCameraHeadingOffset().

    [signal] void OrbitGeoElementCameraController::cameraHeadingOffsetChanged()

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

    double OrbitGeoElementCameraController::cameraPitchOffset() const

    Returns the pitch of the camera relative to the target object.

    An anti-clockwise angle from the positive z-axis of the target element to the target's horizontal plane.

    The default is 45°.

    See also setCameraPitchOffset().

    [signal] void OrbitGeoElementCameraController::cameraPitchOffsetChanged()

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

    bool OrbitGeoElementCameraController::isAutoHeadingEnabled() const

    Returns 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.

    If you have applied a renderer to the target GeoElement, you can use the renderer's RendererSceneProperties::headingExpression to control its heading.

    See also RendererSceneProperties::headingExpression.

    bool OrbitGeoElementCameraController::isAutoPitchEnabled() const

    Returns 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.

    If you have applied a renderer to the target GeoElement, you can use the renderer's RendererSceneProperties::pitchExpression to control its pitch.

    {RendererSceneProperties::pitchExpression}

    See also Esri::ArcGISRuntime::RendererSceneProperties::pitchExpression.

    bool OrbitGeoElementCameraController::isAutoRollEnabled() const

    Returns 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.

    If you have applied a renderer to the target GeoElement, you can use the renderer's RendererSceneProperties::rollExpression to control its roll.

    {RendererSceneProperties::rollExpression}

    See also Esri::ArcGISRuntime::RendererSceneProperties::rollExpression.

    bool OrbitGeoElementCameraController::isCameraDistanceInteractive() const

    Returns 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.

    bool OrbitGeoElementCameraController::isCameraHeadingOffsetInteractive() const

    Returns 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.

    bool OrbitGeoElementCameraController::isCameraPitchOffsetInteractive() const

    Returns 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.

    double OrbitGeoElementCameraController::maxCameraDistance() const

    Returns the maximum camera distance from the target in meters.

    There is no limit on the set maximum distance. Animations and interactions are bounded by this limit.

    See also setMaxCameraDistance().

    double OrbitGeoElementCameraController::maxCameraHeadingOffset() const

    Returns 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 minCameraHeadingOffset. Animations and interactions are bounded by this limit.

    The default value is 180.

    See also setMaxCameraHeadingOffset().

    double OrbitGeoElementCameraController::maxCameraPitchOffset() const

    Returns the maximum camera pitch offset relative to the target's GeoElement, in degrees.

    The angle must be between minCameraPitchOffset and 90. Animations and interactions are bounded by this limit.

    The default value is 90.

    See also setMaxCameraPitchOffset().

    double OrbitGeoElementCameraController::minCameraDistance() const

    Returns 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.

    See also setMinCameraDistance().

    double OrbitGeoElementCameraController::minCameraHeadingOffset() const

    Returns 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 maxCameraHeadingOffset. Animations and interactions are bounded by this limit.

    The default value is -180.

    See also setMinCameraHeadingOffset().

    double OrbitGeoElementCameraController::minCameraPitchOffset() const

    Returns the minimum camera pitch offset relative to the target's GeoElement, in degrees.

    The angle must be between -90 and maxCameraPitchOffset. Animations and interactions are bounded by this limit.

    The default value is -90.

    See also setMinCameraPitchOffset().

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

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

    • 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.

    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 OrbitGeoElementCameraController::setAutoHeadingEnabled(bool enabled)

    Sets the autoHeadingEnabled to enabled.

    See also isAutoHeadingEnabled.

    void OrbitGeoElementCameraController::setAutoPitchEnabled(bool enabled)

    Sets the autoPitchEnabled to enabled.

    See also isAutoPitchEnabled.

    void OrbitGeoElementCameraController::setAutoRollEnabled(bool enabled)

    Sets the autoRollEnabled to enabled.

    See also isAutoRollEnabled.

    void OrbitGeoElementCameraController::setCameraDistance(double distance)

    Sets the cameraDistance to distance.

    This value must be greater than 0.

    See also cameraDistance.

    void OrbitGeoElementCameraController::setCameraDistanceInteractive(bool interactiveDistance)

    Sets the cameraDistanceInteractive to interactiveDistance.

    See also isCameraDistanceInteractive.

    void OrbitGeoElementCameraController::setCameraHeadingOffset(double cameraHeading)

    Sets the cameraHeadingOffset to cameraHeading.

    See also cameraHeadingOffset.

    void OrbitGeoElementCameraController::setCameraHeadingOffsetInteractive(bool interactiveHeading)

    Sets the cameraHeadingOffsetInteractive to interactiveHeading.

    See also isCameraHeadingOffsetInteractive.

    void OrbitGeoElementCameraController::setCameraPitchOffset(double cameraPitch)

    Sets the cameraPitchOffset to cameraPitch.

    See also cameraPitchOffset.

    void OrbitGeoElementCameraController::setCameraPitchOffsetInteractive(bool interactivePitch)

    Sets the cameraPitchOffsetInteractive to interactivePitch.

    See also isCameraPitchOffsetInteractive.

    void OrbitGeoElementCameraController::setMaxCameraDistance(double maxDistance)

    Sets the maxCameraDistance to maxDistance.

    See also maxCameraDistance.

    void OrbitGeoElementCameraController::setMaxCameraHeadingOffset(double maxHeading)

    Sets the maxCameraHeadingOffset to maxHeading.

    See also maxCameraHeadingOffset.

    void OrbitGeoElementCameraController::setMaxCameraPitchOffset(double maxPitch)

    Sets the maxCameraPitchOffset to maxPitch.

    See also maxCameraPitchOffset.

    void OrbitGeoElementCameraController::setMinCameraDistance(double minDistance)

    Sets the minCameraDistance to minDistance.

    See also minCameraDistance.

    void OrbitGeoElementCameraController::setMinCameraHeadingOffset(double minHeading)

    SSets the minCameraHeadingOffset to minHeading.

    See also minCameraHeadingOffset.

    void OrbitGeoElementCameraController::setMinCameraPitchOffset(double minPitch)

    Sets the minCameraPitchOffset to minPitch.

    See also minCameraPitchOffset.

    void OrbitGeoElementCameraController::setTargetOffsetX(double offsetX)

    Sets the targetOffsetX to offsetX.

    See also targetOffsetX.

    void OrbitGeoElementCameraController::setTargetOffsetY(double offsetY)

    Sets the targetOffsetY to offsetY.

    See also targetOffsetY.

    void OrbitGeoElementCameraController::setTargetOffsetZ(double offsetZ)

    Sets the targetOffsetZ to offsetZ.

    See also targetOffsetZ.

    [since Esri::ArcGISRuntime 200.2] QFuture<bool> OrbitGeoElementCameraController::setTargetOffsetsAsync(double x, double y, double z, float duration)

    Animates the camera to a new position using the target offsets of the camera.

    • x - The change x offset symbol center.
    • y - The change y offset symbol center.
    • z - The change z offset symbol center.
    • duration - The duration of the animation in seconds.

    By default the camera focus's 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.

    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 OrbitGeoElementCameraController::setTargetVerticalScreenFactor(float verticalFactor)

    Sets the targetVerticalScreenFactor to verticalFactor.

    See also targetVerticalScreenFactor.

    Esri::ArcGISRuntime::GeoElement *OrbitGeoElementCameraController::targetGeoElement() const

    Returns 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.

    double OrbitGeoElementCameraController::targetOffsetX() const

    Returns the offset of the target focus point relative to the targetGeoElement along its X axis in the symbol coordinate system.

    By default, the camera focuses on the center point of the targetGeoElement geometry.

    The default value is 0.

    See also setTargetOffsetX().

    double OrbitGeoElementCameraController::targetOffsetY() const

    Returns the offset of the target focus point relative to the targetGeoElement along its Y axis in the symbol coordinate system.

    By default, the camera focuses on the center point of the targetGeoElement geometry.

    The default value is 0.

    See also setTargetOffsetY().

    double OrbitGeoElementCameraController::targetOffsetZ() const

    Returns the offset of the target focus point relative to the targetGeoElement along its Z axis in the symbol coordinate system.

    By default, the camera focuses on the center point of the targetGeoElement geometry.

    The default value is 0.

    See also setTargetOffsetZ().

    float OrbitGeoElementCameraController::targetVerticalScreenFactor() const

    Returns 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).

    See also setTargetVerticalScreenFactor() and OrbitGeoElementCameraController.

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