Interface IAnchorManager
Create and persist a network of anchors around the camera as it moves around, and feed them into the plugin.
Inherited Members
Namespace: Microsoft.MixedReality.WorldLocking.Core
Assembly: cs.temp.dll.dll
Syntax
public interface IAnchorManager : IDisposable
Properties
AnchorFromSpongy
Get the transform from spongy space to the space anchors are located in.
Declaration
UnityEngine.Pose AnchorFromSpongy { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Pose |
Remarks
This varies according to the design of the underlying platform anchor subsystem. It may also vary over time (so don't cache this).
ErrorStatus
Error string for last error, cleared at beginning of each update.
Declaration
string ErrorStatus { get; }
Property Value
Type | Description |
---|---|
String |
MaxAnchorEdgeLength
Maximum distance between two anchors to create an edge between them.
Declaration
float MaxAnchorEdgeLength { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Note that the MaxAnchorEdgeLength should be longer than the MinAnchorDistance, or else anchors will not be connected into a graph as they are created.
MaxLocalAnchors
Maximum number of local anchors in the internal anchor graph.
Declaration
int MaxLocalAnchors { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Zero or negative means unlimited anchors.
MinNewAnchorDistance
Minimum distance of head to nearest anchor to create a new anchor.
Declaration
float MinNewAnchorDistance { get; set; }
Property Value
Type | Description |
---|---|
Single |
NumAnchors
Return the current number of spongy anchors.
Declaration
int NumAnchors { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The number of anchors known to AnchorManager should always be identical to the frozen anchors known to the engine.
NumEdges
The number of edges connecting spongy anchors.
Declaration
int NumEdges { get; }
Property Value
Type | Description |
---|---|
Int32 |
SupportsPersistence
Whether the underlying anchors can be locally persisted and reloaded.
Declaration
bool SupportsPersistence { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
LoadAnchors()
Load the spongy anchors from persistent storage
Declaration
Task LoadAnchors()
Returns
Type | Description |
---|---|
Task |
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.
Reset()
Delete all spongy anchor objects and reset internal state
Declaration
void Reset()
SaveAnchors()
Save the spongy anchors to persistent storage
Declaration
Task SaveAnchors()
Returns
Type | Description |
---|---|
Task |
Update()
Create any needed anchors/edges and update plugin
Declaration
bool Update()
Returns
Type | Description |
---|---|
Boolean | Whether any anchors are active and were updated. |