ArcGISArViewInterface Class

  • ArcGISArViewInterface
  • class Esri::ArcGISRuntime::Toolkit::ArcGISArViewInterface

    Base class to impement AR scene view. More...

    Header: #include <ArcGISArViewInterface>
    Since: Esri::ArcGISRuntime 100.6
    Inherits: QQuickFramebufferObject
    Inherited By:

    Esri::ArcGISRuntime::Toolkit::ArcGISArView

    Public Functions

    virtual ~ArcGISArViewInterface() override
    ArRawPtr *arRawPtr() const
    Esri::ArcGISRuntime::Toolkit::LocationDataSource *locationDataSource() const
    ArEnums::LocationTrackingMode locationTrackingMode() const
    QColor planeColor() const
    QColor pointCloudColor() const
    int pointCloudSize() const
    bool renderVideoFeed() const
    void resetTracking()
    void setLocationDataSource(Esri::ArcGISRuntime::Toolkit::LocationDataSource *locationDataSource)
    void setLocationTrackingMode(ArEnums::LocationTrackingMode locationTrackingMode)
    void setPlaneColor(const QColor &planeColor)
    void setPointCloudColor(const QColor &pointCloudColor)
    void setPointCloudSize(int pointCloudSize)
    void setRenderVideoFeed(bool renderVideoFeed)
    void setTracking(bool tracking)
    void setTranslationFactor(double translationFactor)
    void startTracking()
    void startTracking(ArEnums::LocationTrackingMode locationTrackingMode)
    void stopTracking()
    bool tracking() const
    double translationFactor() const

    Signals

    Protected Functions

    ArcGISArViewInterface(QQuickItem *parent = nullptr)
    ArcGISArViewInterface(bool renderVideoFeed, QQuickItem *parent = nullptr)

    Detailed Description

    This class provides the AR features without using the C++ or QML APIs of the ArcGIS Maps SDK for Qt. It is used as a base class to create two API-dependent classes: ArcGISArSceneView which uses the C++ API and QmlArcGISArSceneView which uses the QML API.

    Member Function Documentation

    [explicit protected] ArcGISArViewInterface::ArcGISArViewInterface(QQuickItem *parent = nullptr)

    A constructor that accepts an optional parent.

    The default values for the renderVideoFeed property is true.

    [explicit protected] ArcGISArViewInterface::ArcGISArViewInterface(bool renderVideoFeed, QQuickItem *parent = nullptr)

    A constructor that accepts an optional parent.

    • renderVideoFeed - Sets to true to render the camera frames in the background. in Android and ARKit in iOS).
    • parent - optional.

    [override virtual] ArcGISArViewInterface::~ArcGISArViewInterface()

    The destructor.

    template <typename ArRawPtr> ArRawPtr *ArcGISArViewInterface::arRawPtr() const

    Returns the internal object used for AR tracking. The available objects depend on the platform. Using an invalid template argument will cause a link error. The pointer returned by this function can be nullptr.

    On iOS

    On iOS, the template argument must be one of the types from the following list:

    • ARSession - The current AR session object. https://developer.apple.com/documentation/arkit/arsession?language=objc
    • ARConfiguration - The AR configuration object used to run the AR session. https://developer.apple.com/documentation/arkit/arconfiguration?language=objc
    • NSObject<ARSessionDelegate> - The session delegate which received the updates. https://developer.apple.com/documentation/arkit/arsessiondelegate?language=objc

    On Android

    On Android, the template argument must be one of the types from the following list:

    • ArSession - The current AR session object. https://developers.google.com/ar/reference/c/group/session
    • ArFrame - The last received AR frame object. https://developers.google.com/ar/reference/c/group/frame
    • ArCamera - The last received AR camera object. https://developers.google.com/ar/reference/c/group/camera
    ArSession* arSession = arcGISArView->arRawPtr<ArSession>(); // ARSession on iOS and ArSession on Android
    if (arSession)
    {
      // use AR session
    }

    Esri::ArcGISRuntime::Toolkit::LocationDataSource *ArcGISArViewInterface::locationDataSource() const

    Returns the LocationDataSource if the AR scene view uses it to update the location or nullptr is the location is updated by the AR framework.

    Note: Getter function for property locationDataSource.

    See also setLocationDataSource().

    ArEnums::LocationTrackingMode ArcGISArViewInterface::locationTrackingMode() const

    Gets the tracking mode controlling how the locations generated from the location data source are used during AR tracking.

    The default value is LocationTrackingMode::Ignore.

    Note: Getter function for property locationTrackingMode.

    See also setLocationTrackingMode().

    QColor ArcGISArViewInterface::planeColor() const

    Gets the color of the debug planes.

    Note: Getter function for property planeColor.

    See also setPlaneColor().

    QColor ArcGISArViewInterface::pointCloudColor() const

    Gets the color of the debug point cloud.

    Note: Getter function for property pointCloudColor.

    See also setPointCloudColor().

    int ArcGISArViewInterface::pointCloudSize() const

    Gets the size of the debug point cloud.

    Note: Getter function for property pointCloudSize.

    See also setPointCloudSize().

    bool ArcGISArViewInterface::renderVideoFeed() const

    Returns true when the scene view renders the camera frames in the background.

    Note: Getter function for property renderVideoFeed.

    See also setRenderVideoFeed().

    [signal] void ArcGISArViewInterface::renderVideoFeedChanged()

    Signal emitted when the renderVideoFeed property changes.

    Note: Notifier signal for property renderVideoFeed.

    [invokable] void ArcGISArViewInterface::resetTracking()

    Resets the device tracking and related properties.

    Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

    void ArcGISArViewInterface::setLocationDataSource(Esri::ArcGISRuntime::Toolkit::LocationDataSource *locationDataSource)

    Sets the location data source to locationDataSource.

    If locationDataSource is nullptr, the tracking of the LocationDataSource is disabled.

    Note: Setter function for property locationDataSource.

    See also locationDataSource().

    void ArcGISArViewInterface::setLocationTrackingMode(ArEnums::LocationTrackingMode locationTrackingMode)

    Sets the location tracking mode to locationTrackingMode.

    Note: Setter function for property locationTrackingMode.

    See also locationTrackingMode().

    void ArcGISArViewInterface::setPlaneColor(const QColor &planeColor)

    Sets the color of the debug planes to planeColor.

    Note: Setter function for property planeColor.

    See also planeColor().

    void ArcGISArViewInterface::setPointCloudColor(const QColor &pointCloudColor)

    Sets the color of the debug point cloud to pointCloudColor.

    Note: Setter function for property pointCloudColor.

    See also pointCloudColor().

    void ArcGISArViewInterface::setPointCloudSize(int pointCloudSize)

    Sets the size of the debug point cloud to pointCloudSize.

    Note: Setter function for property pointCloudSize.

    See also pointCloudSize().

    void ArcGISArViewInterface::setRenderVideoFeed(bool renderVideoFeed)

    Sets renderVideoFeed to true when the scene view renders the camera frames in the background.

    Note: Setter function for property renderVideoFeed.

    See also renderVideoFeed().

    void ArcGISArViewInterface::setTracking(bool tracking)

    Sets tracking to starts or stops the AR scene view tracking.

    Note: Setter function for property tracking.

    See also tracking().

    void ArcGISArViewInterface::setTranslationFactor(double translationFactor)

    The translationFactor used to support a table top AR experience.

    All the translation of the device are multiplied by this factor, to have translations in the scene view adapted to the scene zooming.

    Note: Setter function for property translationFactor.

    See also translationFactor().

    [invokable] void ArcGISArViewInterface::startTracking()

    Starts AR tracking.

    Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

    [invokable] void ArcGISArViewInterface::startTracking(ArEnums::LocationTrackingMode locationTrackingMode)

    Starts AR tracking with location tracking mode.

    Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

    [invokable] void ArcGISArViewInterface::stopTracking()

    Stops AR tracking.

    Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

    bool ArcGISArViewInterface::tracking() const

    Returns true when the AR scene view is tracking.

    Note: Getter function for property tracking.

    See also setTracking().

    [signal] void ArcGISArViewInterface::trackingChanged()

    Signal emitted when the tracking property changes.

    Note: Notifier signal for property tracking.

    double ArcGISArViewInterface::translationFactor() const

    The translation factor used to support a table top AR experience.

    Note: Getter function for property translationFactor.

    See also setTranslationFactor().

    [signal] void ArcGISArViewInterface::translationFactorChanged()

    Signal emitted when the translationFactor property changes.

    Note: Notifier signal for property translationFactor.

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