• Home
  • Guides
  • API Documentation
WLT documentation has moved.

We are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the Core WLT section of the dot net API explorer and related pages. Existing content will remain here but will not be updated further.

  • API Documentation
  • Reference
  • Microsoft.MixedReality.WorldLocking.Core
  • IAlignmentManager
Search Results for

    Show / Hide Table of Contents
    • Reference
      • Microsoft.MixedReality.WorldLocking.ASA
        • IBinder
        • IBindingOracle
        • ILocalPeg
        • IPublisher
        • LocalPegAndProperties
        • PublisherASA
        • PublisherReadiness
        • ReadinessStatus
        • SpacePinASA
        • SpacePinASA.KeyValPair
        • SpacePinBinder
        • SpacePinBinderFile
        • SpacePinCloudBinding
      • Microsoft.MixedReality.WorldLocking.ASA.Examples
        • ActionCube
        • ActionPublish
        • PlatformMenuSelector
        • ScreenSpacer
        • SpacePinASAManipulation
        • Startup
      • Microsoft.MixedReality.WorldLocking.Core
        • AdjustLocationDelegate
        • AdjustStateDelegate
        • AlignmentManager
        • AlignSubtree
        • AnchorManager
        • AnchorManager.SpongyAnchorWithId
        • AnchorManagerARCore
        • AnchorManagerNull
        • AnchorManagerWSA
        • AnchorSettings
        • AnchorSettings.AnchorSubsystem
        • AttachmentPoint
        • AttachmentPointStateType
        • Diagnostics
        • Diagnostics.Record
        • DiagnosticsSettings
        • Fragment
        • HeadPoseTrackerCamera
        • HeadPoseTrackerXR
        • IAlignmentManager
        • IAnchorManager
        • IAttachmentPoint
        • IAttachmentPointManager
        • IFragmentManager
        • IHeadPoseTracker
        • IOrientable
        • IOrienter
        • LinkageSettings
        • ManagerSettings
        • Orienter
        • Orienter.WeightedRotation
        • OrienterThreeBody
        • PoseExtensions
        • PostAlignmentLoadedDelegate
        • RefitNotificationDelegate
        • ResourceMirror
        • ResourceMirror.CompareToResource<ItemType, ResourceType>
        • ResourceMirror.CreateResource<ItemType, ResourceType>
        • ResourceMirror.DestroyResource<ResourceType>
        • ResourceMirror.UpdateResource<ItemType, ResourceType>
        • SharedDiagnosticsSettings
        • SharedManagerSettings
        • SpacePin
        • SpacePin.ModelPositionSourceEnum
        • SpacePinOrientable
        • SpongyAnchor
        • SpongyAnchorARCore
        • SpongyAnchorARF
        • SpongyAnchorNull
        • SpongyAnchorWSA
        • SpongyAnchorXR
        • TransformExtensions
        • WorldLockingContext
        • WorldLockingManager
      • Microsoft.MixedReality.WorldLocking.Core.ResourceMirrorHelper
        • IdPair<IdType, T>
      • Microsoft.MixedReality.WorldLocking.Core.Triangulator
        • Interpolant
        • ITriangulator
        • SimpleTriangulator
      • Microsoft.MixedReality.WorldLocking.Examples
        • AlignmentControl
        • CircleCam
        • DashboardCommand
        • DashboardUI
        • FallOut
        • ManipulationEndedDelegate
        • ManipulationStartedDelegate
        • PhysicsBeamSample
        • PinManipulator
        • RayPins
        • SpacePinManipulation
        • SpacePinOrientableManipulation
      • Microsoft.MixedReality.WorldLocking.Tools
        • AdjusterBase
        • AdjusterFixed
        • AdjusterMoving
        • AnchorGraphVisual
        • ConnectingLine
        • FrameVisual
        • FrozenAnchorVisual
        • FrozenSpatialMapping
        • FrozenSpatialMapping.QualityType
        • FrozenTapToAdd
        • SimpleConsole
        • SimpleSprite
        • SpacePinMeshVisualizer
        • SpacePinPercentageVisualizer
        • SpongyAnchorVisual
        • StatusToText
        • ToggleWorldAnchor
        • WorldAnchorAdapter
        • WorldLockingSetup

    Interface IAlignmentManager

    Manage pinning the world-locked space to user defined coordinate frame at a discrete set of points in the world.

    Namespace: Microsoft.MixedReality.WorldLocking.Core
    Assembly: cs.temp.dll.dll
    Syntax
    public interface IAlignmentManager

    Properties

    NeedSave

    True if the persistent state of the alignment manager has changed since the last save.

    Declaration
    bool NeedSave { get; }
    Property Value
    Type Description
    Boolean

    PinnedFromLocked

    The pose to insert into the camera's hierarchy above the WorldLocking Adjustment transform (if any).

    Declaration
    Pose PinnedFromLocked { get; }
    Property Value
    Type Description
    Pose

    Methods

    AddAlignmentAnchor(String, Pose, Pose)

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

    Declaration
    AnchorId AddAlignmentAnchor(string uniqueName, Pose virtualPose, Pose lockedPose)
    Parameters
    Type Name Description
    String uniqueName
    Pose virtualPose

    The pose in modeling space.

    Pose lockedPose

    The pose in world locked space.

    Returns
    Type Description
    AnchorId

    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.

    ClearAlignmentAnchors()

    Remove all alignment anchors that have been added. More efficient than removing them individually, and doesn't require having stored their ids on creation.

    Declaration
    void ClearAlignmentAnchors()
    Remarks

    This is more efficient than removing one by one, but take care to discard all existing AnchorIds returned by AddAlignmentAnchor(String, Pose, Pose) after this call, as it will be an error to try to use any of them. Also note that this clears the Alignment Anchors staged for commit with the next SendAlignmentAnchors(), but the current ones will remain effective until the next call to SendAlignmentAnchors, which will send an empty list, unless it has been repopulated after the call to ClearAlignmentAnchors.

    ComputePinnedPose(Pose)

    Update based on new head position.

    Declaration
    void ComputePinnedPose(Pose lockedHeadPose)
    Parameters
    Type Name Description
    Pose lockedHeadPose

    Head pose in world locked space.

    GetAlignmentPose(AnchorId, out Pose)

    Get the world locked space pose associated with this alignment anchor.

    Declaration
    bool GetAlignmentPose(AnchorId anchorId, out Pose lockedPose)
    Parameters
    Type Name Description
    AnchorId anchorId

    Which anchor.

    Pose lockedPose

    Pose to fill out if alignment anchor is found.

    Returns
    Type Description
    Boolean

    True if anchor is found and lockedPose filled in, else false and lockedPose set to identity.

    Load()

    Load all persisted state required for reconstructing the current pinning.

    Declaration
    bool Load()
    Returns
    Type Description
    Boolean

    True if loaded.

    Remarks

    The state required for reconstructing the pinning is loaded, but the reconstruction does not occur. Rather, the PostAlignmentLoadedDelegate is triggered, to prompt external actors to use the RestoreAlignmentAnchor(String, Pose) API to effect the reconstruction. 👍

    RegisterForLoad(PostAlignmentLoadedDelegate)

    Register for notification that pin data has finished loaded and is available.

    Declaration
    void RegisterForLoad(PostAlignmentLoadedDelegate del)
    Parameters
    Type Name Description
    PostAlignmentLoadedDelegate del

    Delegate to notify.

    Remarks

    The delegate should be unregistered when no longer needed, e.g. owning object is destroyed.

    RemoveAlignmentAnchor(AnchorId)

    Remove the given alignment anchor from the system.

    Declaration
    bool RemoveAlignmentAnchor(AnchorId anchorId)
    Parameters
    Type Name Description
    AnchorId anchorId

    The anchor to remove (as returned by AddAlignmentAnchor(String, Pose, Pose)

    Returns
    Type Description
    Boolean

    True if the anchor was found.

    RestoreAlignmentAnchor(String, Pose)

    Attempt to restore an alignment anchor from an earlier session. Stored alignment anchor must match in both uniqueName and virtual pose.

    Declaration
    AnchorId RestoreAlignmentAnchor(string uniqueName, Pose virtualPose)
    Parameters
    Type Name Description
    String uniqueName

    Unique name use previously to create the alignment anchor.

    Pose virtualPose

    Virtual pose to match with stored anchor pose.

    Returns
    Type Description
    AnchorId

    AnchorId of restored Alignment Anchor on success, else AnchorId.Invalid.

    Remarks

    If successful, alignment anchor is added but not sent. It must be followed by a call to SendAlignmentAnchors to take effect.

    Save()

    Save state needed to reconstruct later from persistent storage.

    Declaration
    bool Save()
    Returns
    Type Description
    Boolean

    True if saved (even if empty).

    SendAlignmentAnchors()

    Submit all accumulated alignment anchors.

    Declaration
    void SendAlignmentAnchors()
    Remarks

    All anchors previously submitted via SendAlignmentAnchors() will be cleared and replaced by the current set. SendAlignmentAnchors() submits the current set of anchors, but they will have no effect until the next Refreeze() is successfully performed.

    UnregisterForLoad(PostAlignmentLoadedDelegate)

    Unregister for notification that pin data has finished loaded and is available.

    Declaration
    void UnregisterForLoad(PostAlignmentLoadedDelegate del)
    Parameters
    Type Name Description
    PostAlignmentLoadedDelegate del

    Delegate to remove from notifications.

    Events

    OnTriangulationBuilt

    New triangulation was built based upon recent poses.

    Declaration
    event EventHandler<ITriangulator> OnTriangulationBuilt
    Event Type
    Type Description
    EventHandler<ITriangulator>
    In This Article
    • Properties
      • NeedSave
      • PinnedFromLocked
    • Methods
      • AddAlignmentAnchor(String, Pose, Pose)
      • ClearAlignmentAnchors()
      • ComputePinnedPose(Pose)
      • GetAlignmentPose(AnchorId, out Pose)
      • Load()
      • RegisterForLoad(PostAlignmentLoadedDelegate)
      • RemoveAlignmentAnchor(AnchorId)
      • RestoreAlignmentAnchor(String, Pose)
      • Save()
      • SendAlignmentAnchors()
      • UnregisterForLoad(PostAlignmentLoadedDelegate)
    • Events
      • OnTriangulationBuilt
    Back to top Generated by DocFX