IAlignmentManager.AddAlignmentAnchor(String, Pose, Pose) Method

Definition

Add an anchor for aligning a virtual pose to a pose in real space.

public Microsoft.MixedReality.WorldLocking.Core.AnchorId AddAlignmentAnchor (string uniqueName, UnityEngine.Pose virtualPose, UnityEngine.Pose lockedPose);
abstract member AddAlignmentAnchor : string * UnityEngine.Pose * UnityEngine.Pose -> Microsoft.MixedReality.WorldLocking.Core.AnchorId
Public Function AddAlignmentAnchor (uniqueName As String, virtualPose As Pose, lockedPose As Pose) As AnchorId

Parameters

uniqueName
String
virtualPose
UnityEngine.Pose

The pose in modeling space.

lockedPose
UnityEngine.Pose

The pose in world locked space.

Returns

The id for the added anchor if successful, else AnchorId.Unknown. See remarks.

Remarks

This must be followed by SendAlignmentAnchors() before it will have any effect. The returned AnchorId may be stored for future manipulation of the created anchor (e.g. for individual removal in RemoveAlignmentAnchor(AnchorId)). The system must be currently tracking to successfully add an alignment anchor. The alignment anchor will be in the current Fragment. The current fragment will be available when there is no tracking, and so this call will fail. If this call fails, indicated by a return of AnchorId.Unknown, then it should be called again on a later frame until it succeeds.

Applies to