Skip To Content ArcGIS for Developers Sign In Dashboard

ArcGISArViewInterface Class

(Esri::ArcGISRuntime::Toolkit::ArcGISArViewInterface)

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

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

Esri::ArcGISRuntime::Toolkit::ArcGISArView

Properties

Public Functions

ArRawPtr *arRawPtr() const
LocationDataSource *locationDataSource() const
ArEnums::LocationTrackingMode locationTrackingMode() const
QColor planeColor() const
QColor pointCloudColor() const
int pointCloudSize() const
virtual void renderFrameInternal() = 0
bool renderVideoFeed() const
void resetTracking()
virtual void setFieldOfViewInternal(double xFocalLength, double yFocalLength, double xPrincipal, double yPrincipal, double xImageSize, double yImageSize) = 0
void setLocationDataSource(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)
virtual void setTransformationMatrixInternal(double quaternionX, double quaternionY, double quaternionZ, double quaternionW, double translationX, double translationY, double translationZ) = 0
void setTranslationFactor(double translationFactor)
void startTracking()
void startTracking(ArEnums::LocationTrackingMode locationTrackingMode)
void stopTracking()
bool tracking() const
double translationFactor() const

Signals

void errorOccurred(const QString &errorMessage, const QString &additionalMessage)
void locationDataSourceChanged()
void locationTrackingModeChanged()
void planeColorChanged()
void pointCloudColorChanged()
void pointCloudSizeChanged()
void renderVideoFeedChanged()
void trackingChanged()
void translationFactorChanged()

Protected Functions

ArcGISArViewInterface(QQuickItem *parent = nullptr)
ArcGISArViewInterface(bool renderVideoFeed, QQuickItem *parent = nullptr)
virtual void resetTrackingInternal() = 0
virtual void setHeadingInternal(double heading) = 0
virtual void setLocationInternal(double latitude, double longitude, double altitude) = 0
virtual void setTranslationFactorInternal(double translationFactor) = 0

Detailed Description

Base class to impement AR scene view.

This class provides the AR features without using the C++ or QML APIs of the ArcGIS Runtime 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.

Property Documentation

locationDataSource : LocationDataSource *

Access functions:

LocationDataSource *locationDataSource() const
void setLocationDataSource(LocationDataSource *locationDataSource)

Notifier signal:

void locationDataSourceChanged()

locationTrackingMode : ArEnums::LocationTrackingMode

Access functions:

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

Notifier signal:

void locationTrackingModeChanged()

planeColor : QColor

Access functions:

QColor planeColor() const
void setPlaneColor(const QColor &planeColor)

Notifier signal:

void planeColorChanged()

pointCloudColor : QColor

Access functions:

QColor pointCloudColor() const
void setPointCloudColor(const QColor &pointCloudColor)

Notifier signal:

void pointCloudColorChanged()

pointCloudSize : int

Access functions:

int pointCloudSize() const
void setPointCloudSize(int pointCloudSize)

Notifier signal:

void pointCloudSizeChanged()

renderVideoFeed : bool

Access functions:

bool renderVideoFeed() const
void setRenderVideoFeed(bool renderVideoFeed)

Notifier signal:

tracking : bool

Access functions:

bool tracking() const
void setTracking(bool tracking)

Notifier signal:

translationFactor : double

Access functions:

double translationFactor() const
void setTranslationFactor(double translationFactor)

Notifier signal:

Member Function Documentation

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

A constructor that accepts an optional parent.

The default values for the renderVideoFeed property is true.

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

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

  • 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

  • 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->getAR<ARSession>();
if (arSession)
{
  // use AR session
}

[signal] void ArcGISArViewInterface::errorOccurred(const QString &errorMessage, const QString &additionalMessage)

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

[pure virtual] void ArcGISArViewInterface::renderFrameInternal()

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.

void ArcGISArViewInterface::resetTracking()

Resets the device tracking and related properties.

[pure virtual protected] void ArcGISArViewInterface::resetTrackingInternal()

[pure virtual] void ArcGISArViewInterface::setFieldOfViewInternal(double xFocalLength, double yFocalLength, double xPrincipal, double yPrincipal, double xImageSize, double yImageSize)

[pure virtual protected] void ArcGISArViewInterface::setHeadingInternal(double heading)

void ArcGISArViewInterface::setLocationDataSource(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().

[pure virtual protected] void ArcGISArViewInterface::setLocationInternal(double latitude, double longitude, double altitude)

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

Starts or stops the AR scene view tracking.

Note: Setter function for property tracking.

See also tracking().

[pure virtual] void ArcGISArViewInterface::setTransformationMatrixInternal(double quaternionX, double quaternionY, double quaternionZ, double quaternionW, double translationX, double translationY, double translationZ)

void ArcGISArViewInterface::setTranslationFactor(double translationFactor)

The translation factor 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().

[pure virtual protected] void ArcGISArViewInterface::setTranslationFactorInternal(double translationFactor)

void ArcGISArViewInterface::startTracking()

Starts AR tracking.

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

Starts AR tracking with location tracking mode.

void ArcGISArViewInterface::stopTracking()

Stops AR tracking.

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.


Feedback on this topic?