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 |
---|---|
Anchor |
The id for the added anchor if successful, else AnchorId.Unknown. See remarks. |
Remarks
This must be followed by Send
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 Add
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 |
---|---|---|
Anchor |
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 Post
RegisterForLoad(PostAlignmentLoadedDelegate)
Register for notification that pin data has finished loaded and is available.
Declaration
void RegisterForLoad(PostAlignmentLoadedDelegate del)
Parameters
Type | Name | Description |
---|---|---|
Post |
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 |
---|---|---|
Anchor |
anchorId | The anchor to remove (as returned by Add |
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 |
---|---|
Anchor |
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 |
---|---|---|
Post |
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 |
---|---|
Event |