CloudSpatialAnchorSession.CreateAnchorAsync(CloudSpatialAnchor) Method

Definition

Creates a new persisted spatial anchor from the specified local anchor and string properties.

public:
 System::Threading::Tasks::Task ^ CreateAnchorAsync(Microsoft::Azure::SpatialAnchors::CloudSpatialAnchor ^ anchor);
public System.Threading.Tasks.Task CreateAnchorAsync (Microsoft.Azure.SpatialAnchors.CloudSpatialAnchor anchor);
member this.CreateAnchorAsync : Microsoft.Azure.SpatialAnchors.CloudSpatialAnchor -> System.Threading.Tasks.Task
Public Function CreateAnchorAsync (anchor As CloudSpatialAnchor) As Task

Parameters

anchor
CloudSpatialAnchor

Anchor to be persisted.

Returns

Remarks

The local anchor passed into this method must have a valid transform. Note some platforms supported by Azure Spatial Anchors such as iOS allow transforms with scale component != 1.0. Azure Spatial Anchors SDK does not support such transforms and it will fail to create the spatial anchor with error code InvalidAnchorTransformRigidity. Any scale handling for anchors must be done at the app level.

Applies to