Class AnchorManagerWSA
Encapsulation of spongy world (raw input) state. Its primary duty is the creation and maintenance of the graph of (spongy) anchors built up over the space traversed by the camera.
Inherited Members
Namespace: Microsoft.MixedReality.WorldLocking.Core
Assembly: cs.temp.dll.dll
Syntax
public class AnchorManagerWSA : AnchorManager, IAnchorManager, IDisposable
Remarks
Anchor and Edge creation algorithm:
Goal: a simple and robust algorithm that guarantees an even distribution of anchors, fully connected by edges between nearest neighbors with a minimum of redundant edges
For simplicity, the algorithm should be stateless between time steps
Rules
- two parameters define spheres MIN and MAX around current position
- whenever MIN does not contain any anchors, a new anchor is created
- when a new anchor is created is is linked by edges to all anchors within MAX
- the MAX radius is 20cm larger than MIN radius which would require 12 m/s beyond world record sprinting speed to cover in one frame
- whenever MIN contains more than one anchor, the anchor closest to current position is connected to all others within MIN
Properties
SupportsPersistence
Whether the underlying anchors can be locally persisted and reloaded.
Declaration
public override bool SupportsPersistence { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
TrackingStartDelayTime
Declaration
protected override float TrackingStartDelayTime { get; }
Property Value
Type | Description |
---|---|
Single |
Overrides
Methods
CreateAnchor(AnchorId, Transform, Pose)
Declaration
protected override SpongyAnchor CreateAnchor(AnchorId id, Transform parent, Pose initialPose)
Parameters
Type | Name | Description |
---|---|---|
AnchorId | id | |
Transform | parent | |
Pose | initialPose |
Returns
Type | Description |
---|---|
SpongyAnchor |
Overrides
DestroyAnchor(AnchorId, SpongyAnchor)
Declaration
protected override SpongyAnchor DestroyAnchor(AnchorId id, SpongyAnchor spongyAnchor)
Parameters
Type | Name | Description |
---|---|---|
AnchorId | id | |
SpongyAnchor | spongyAnchor |
Returns
Type | Description |
---|---|
SpongyAnchor |
Overrides
IsTracking()
Declaration
protected override bool IsTracking()
Returns
Type | Description |
---|---|
Boolean |
Overrides
LoadAnchors(IPlugin, AnchorId, Transform, List<AnchorManager.SpongyAnchorWithId>)
Load the spongy anchors from persistent storage
Declaration
protected override async Task LoadAnchors(IPlugin plugin, AnchorId firstId, Transform parent, List<AnchorManager.SpongyAnchorWithId> spongyAnchors)
Parameters
Type | Name | Description |
---|---|---|
IPlugin | plugin | |
AnchorId | firstId | |
Transform | parent | |
List<AnchorManager.SpongyAnchorWithId> | spongyAnchors |
Returns
Type | Description |
---|---|
Task |
Overrides
Remarks
The set of spongy anchors loaded by this routine is defined by the frozen anchors previously loaded into the plugin.
Likewise, when a spongy anchor fails to load, this routine will delete its frozen counterpart from the plugin.
SaveAnchors(List<AnchorManager.SpongyAnchorWithId>)
Declaration
protected override async Task SaveAnchors(List<AnchorManager.SpongyAnchorWithId> spongyAnchors)
Parameters
Type | Name | Description |
---|---|---|
List<AnchorManager.SpongyAnchorWithId> | spongyAnchors |
Returns
Type | Description |
---|---|
Task |
Overrides
TryCreate(IPlugin, IHeadPoseTracker)
Declaration
public static AnchorManagerWSA TryCreate(IPlugin plugin, IHeadPoseTracker headTracker)
Parameters
Type | Name | Description |
---|---|---|
IPlugin | plugin | |
IHeadPoseTracker | headTracker |
Returns
Type | Description |
---|---|
AnchorManagerWSA |