Interface IBinder
Interface for a binding layer between space pins and cloud anchors.
Namespace: Microsoft.MixedReality.WorldLocking.ASA
Assembly: cs.temp.dll.dll
Syntax
public interface IBinder
Remarks
This abstraction isn't so much for multiple implementations, as for providing a clean API. The IBinder is responsible for managing the mapping between the cloud anchors, which persist and transmit pose data, and the space pins, which use that data to create shared spaces.
Properties
IsReady
If the binder is ready to execute tasks.
Declaration
bool IsReady { get; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Reasons not be be ready include initialization not complete, or already busy on another task.
Name
The name of this binder.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
String |
PublisherStatus
The current status of the publisher.
Declaration
ReadinessStatus PublisherStatus { get; }
Property Value
Type | Description |
---|---|
ReadinessStatus |
Methods
Clear()
Delete all known (bound) cloud anchors from the cloud, and erase their bindings.
Declaration
Task<bool> Clear()
Returns
Type | Description |
---|---|
Task<Boolean> | True on success. |
Remarks
Bound space pins are unaffected, but will no longer be bound.
CreateBinding(String, String)
Set the cloud anchor id associated with this space pin.
Declaration
bool CreateBinding(string spacePinId, string cloudAnchorId)
Parameters
Type | Name | Description |
---|---|---|
String | spacePinId | Name of the space pin to be bound to this cloud id. |
String | cloudAnchorId | Cloud id to be bound to the space pin. |
Returns
Type | Description |
---|---|
Boolean | False if space pin is unknown. Space pin must be registered before being bound. |
Remarks
A space pin must be bound to a cloud anchor id before it can be downloaded.
Download()
Pull down cloud anchors for all known bindings, and apply them to the bound space pins.
Declaration
Task<bool> Download()
Returns
Type | Description |
---|---|
Task<Boolean> | True on success. |
GetBindings()
Known bindings between space pins and cloud anchors.
Declaration
IReadOnlyList<SpacePinCloudBinding> GetBindings()
Returns
Type | Description |
---|---|
IReadOnlyList<SpacePinCloudBinding> |
Publish()
Publish all active space pins to the cloud.
Declaration
Task<bool> Publish()
Returns
Type | Description |
---|---|
Task<Boolean> | True on success. |
Remarks
Space pins which are previously published in this session, i.e. that have a binding to a cloud anchor, will have that cloud anchor deleted first, and a new binding created to the newly published cloud anchor. To be publishable, a SpacePin must have an ILocalPeg created from CreateLocalPeg(String, Pose). The SpacePinASA manages this automatically.
Purge()
Find all cloud anchors in the area, delete them, and release their bindings.
Declaration
Task<bool> Purge()
Returns
Type | Description |
---|---|
Task<Boolean> | True on success. |
RemoveBinding(String)
Erase a binding between a space pin and its corresponding cloud anchor.
Declaration
bool RemoveBinding(string spacePinId)
Parameters
Type | Name | Description |
---|---|---|
String | spacePinId | Space pin to unbind. |
Returns
Type | Description |
---|---|
Boolean | True if found and unbound. |
Remarks
Neither the space pin nor the cloud anchor are affected by this, but will be independent of one another after.
Search()
Search for cloud anchors in the area, download them, and apply to associated space pins.
Declaration
Task<bool> Search()
Returns
Type | Description |
---|---|
Task<Boolean> | True on success |