Class ARSceneView
The Augmented Reality-enabled SceneView control
Namespace: Esri.ArcGISRuntime.ARToolkit.Maui
Assembly: Esri.ArcGISRuntime.ARToolkit.Maui.dll
Syntax
public class ARSceneView : Maui.SceneView, IARSceneView
Constructors
| Improve this Doc View SourceARSceneView()
Initializes a new instance of the ARSceneView class.
Declaration
public ARSceneView()
Fields
| Improve this Doc View SourceClippingDistanceProperty
Identifies the ClippingDistance bindable property.
Declaration
public static readonly BindableProperty ClippingDistanceProperty
Field Value
Type | Description |
---|---|
BindableProperty |
LocationDataSourceProperty
Identifies the LocationDataSource bindable property.
Declaration
public static readonly BindableProperty LocationDataSourceProperty
Field Value
Type | Description |
---|---|
BindableProperty |
NorthAlignProperty
Identifies the NorthAlign bindable property.
Declaration
public static readonly BindableProperty NorthAlignProperty
Field Value
Type | Description |
---|---|
BindableProperty |
OriginCameraProperty
Identifies the OriginCamera bindable property.
Declaration
public static readonly BindableProperty OriginCameraProperty
Field Value
Type | Description |
---|---|
BindableProperty |
RenderPlanesProperty
Identifies the RenderPlanes bindable property.
Declaration
public static readonly BindableProperty RenderPlanesProperty
Field Value
Type | Description |
---|---|
BindableProperty |
RenderVideoFeedProperty
Identifies the RenderVideoFeed bindable property.
Declaration
public static readonly BindableProperty RenderVideoFeedProperty
Field Value
Type | Description |
---|---|
BindableProperty |
TranslationFactorProperty
Identifies the TranslationFactor bindable property.
Declaration
public static readonly BindableProperty TranslationFactorProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
| Improve this Doc View SourceClippingDistance
Gets or sets the clipping distance from the origin camera, beyond which data will not be displayed. Defaults to 0.0. When set to 0.0, there is no clipping distance; all data is displayed.
Declaration
public double ClippingDistance { get; set; }
Property Value
Type | Description |
---|---|
Double |
Remarks
You can use clipping distance to limit the display of data in world-scale AR or clip data for tabletop AR.
InitialTransformation
Gets the initial transformation used for a table top experience. Defaults to the Identity Matrix.
Declaration
public Mapping.TransformationMatrix InitialTransformation { get; }
Property Value
Type | Description |
---|---|
Mapping.TransformationMatrix |
See Also
| Improve this Doc View SourceLocationDataSource
The data source used to get device location. Used either in conjuction with device camera tracking data or when device camera tracking is not present or not being used.
Declaration
public LocationDataSource LocationDataSource { get; set; }
Property Value
Type | Description |
---|---|
LocationDataSource |
NorthAlign
Gets or sets a value indicating whether the scene should attempt to use the device compass to align the scene towards north.
Declaration
public bool NorthAlign { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Note that the accuracy of the compass can heavily affect the quality of alignment.
OriginCamera
Gets or sets the viewpoint camera used to set the initial view of the sceneView instead of the device's GPS location via the location data source.
Declaration
public Mapping.Camera OriginCamera { get; set; }
Property Value
Type | Description |
---|---|
Mapping.Camera |
See Also
| Improve this Doc View SourceRenderPlanes
Gets or sets a value indicating whether to render planes that's been detected
Declaration
public bool RenderPlanes { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
RenderVideoFeed
Gets or sets a value indicating whether the background of the ARSceneView is transparent or not. Enabling transparency allows for the camera feed to be visible underneath the ARSceneView.
Declaration
public bool RenderVideoFeed { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
TranslationFactor
Gets or sets translation factor used to support a table top AR experience.
Declaration
public double TranslationFactor { get; set; }
Property Value
Type | Description |
---|---|
Double |
Remarks
A value of 1 means if the device 1 meter in the real world, it'll move 1 m in the AR world. Set this to 1000 to make 1 m meter 1km in the AR world.
Methods
| Improve this Doc View SourceARScreenToLocation(Point)
Determines the map point for the given screen point hittesting any surface in the scene.
Declaration
public Geometry.MapPoint? ARScreenToLocation(Point screenPoint)
Parameters
Type | Name | Description |
---|---|---|
Point | screenPoint | The point in screen coordinates. |
Returns
Type | Description |
---|---|
Nullable<Geometry.MapPoint> | The map point corresponding to screenPoint. |
ResetTracking()
Resets the device tracking, using OriginCamera if it's not null or the device's GPS location via the location data source.
Declaration
public void ResetTracking()
SetInitialTransformation(Mapping.TransformationMatrix)
Sets the initial transformation used to offset the OriginCamera.
Declaration
public void SetInitialTransformation(Mapping.TransformationMatrix transformationMatrix)
Parameters
Type | Name | Description |
---|---|---|
Mapping.TransformationMatrix | transformationMatrix | Initial transformation matrix |
See Also
| Improve this Doc View SourceSetInitialTransformation(Point)
Sets the initial transformation used to offset the OriginCamera.
The initial transformation is based on an AR point determined via existing plane hit detection from screenLocation
.
Declaration
public bool SetInitialTransformation(Point screenLocation)
Parameters
Type | Name | Description |
---|---|---|
Point | screenLocation | The screen point to determine the InitialTransformation from. |
Returns
Type | Description |
---|---|
Boolean | if an AR point cannot be determined, this method will return |
See Also
| Improve this Doc View SourceStartTrackingAsync(ARLocationTrackingMode)
Starts device tracking.
Declaration
public Task StartTrackingAsync(ARLocationTrackingMode locationTrackingMode = ARLocationTrackingMode.Ignore)
Parameters
Type | Name | Description |
---|---|---|
ARLocationTrackingMode | locationTrackingMode |
Returns
Type | Description |
---|---|
Task |
StopTrackingAsync()
Suspends device tracking.
Declaration
public Task StopTrackingAsync()
Returns
Type | Description |
---|---|
Task |
Events
| Improve this Doc View SourceOriginCameraChanged
Raised when the OriginCamera has changed
Declaration
public event EventHandler? OriginCameraChanged
Event Type
Type | Description |
---|---|
Nullable<EventHandler> |
See Also
| Improve this Doc View SourcePlanesDetectedChanged
Raises an event indicating whether horizontal planes are currently detected or not
Declaration
public event EventHandler<bool>? PlanesDetectedChanged
Event Type
Type | Description |
---|---|
Nullable<EventHandler<Boolean>> |
Explicit Interface Implementations
| Improve this Doc View SourceIARSceneView.OnOriginCameraChanged()
Declaration
void IARSceneView.OnOriginCameraChanged()
IARSceneView.OnPlanesDetectedChanged(Boolean)
Declaration
void IARSceneView.OnPlanesDetectedChanged(bool planesDetected)
Parameters
Type | Name | Description |
---|---|---|
Boolean | planesDetected |