API reference
API reference
Select your platform
No SDKs available
No versions available

UnboundAnchor Struct

A spatial anchor that has not been bound to an OVRSpatialAnchor.

Overview

Properties

Guid
Uuid[Get]
The universally unique identifier associated with this anchor.
bool
Whether the anchor has been localized.
bool
Whether the anchor is in the process of being localized.
Pose
Pose[Get]
The world space pose of the spatial anchor.

Public Member Functions

OVRTask< bool >
LocalizeAsync
( double timeout )
Localizes an anchor.
void
BindTo
( OVRSpatialAnchor spatialAnchor )
Binds an unbound anchor to an OVRSpatialAnchor component.
void
Localize
( Action< UnboundAnchor, bool > onComplete,
double timeout )
Localizes an anchor.

Details

Detailed Description

Use this object to bind an unbound spatial anchor to an OVRSpatialAnchor.

Properties

Guid OVRSpatialAnchor.UnboundAnchor.Uuid
The universally unique identifier associated with this anchor.
bool OVRSpatialAnchor.UnboundAnchor.Localized
Whether the anchor has been localized.
Prior to localization, the anchor's Pose cannot be determined.
See Also:
Localized, Localizing
bool OVRSpatialAnchor.UnboundAnchor.Localizing
Whether the anchor is in the process of being localized.
See Also:
Localized, Localize
Pose OVRSpatialAnchor.UnboundAnchor.Pose
The world space pose of the spatial anchor.

Member Functions

OVRTask< bool > OVRSpatialAnchor.UnboundAnchor.LocalizeAsync
( double timeout )
Localizes an anchor.
The delegate supplied to OVRSpatialAnchor.LoadUnboundAnchorsAsync receives an array of unbound spatial anchors. You can choose whether to localize each one and be notified when localization completes.
Upon successful localization, your delegate should instantiate an OVRSpatialAnchor, then bind the UnboundAnchor to the OVRSpatialAnchor by calling UnboundAnchor.BindTo. Once an UnboundAnchor is bound to an OVRSpatialAnchor, it cannot be used again; that is, it cannot be bound to multiple OVRSpatialAnchor components.
Parameters
timeout
The timeout, in seconds, to attempt localization, or zero to indicate no timeout.
Returns
An OVRTask<TResult> with a boolean type parameter indicating the success of the localization.
Exceptions
InvalidOperationException
Thrown if the anchor does not support localization, e.g., because it is invalid.
void OVRSpatialAnchor.UnboundAnchor.BindTo
( OVRSpatialAnchor spatialAnchor )
Binds an unbound anchor to an OVRSpatialAnchor component.
Use this to bind an unbound anchor to an OVRSpatialAnchor. After BindTo is used to bind an UnboundAnchor to an OVRSpatialAnchor, the UnboundAnchor is no longer valid; that is, it cannot be bound to another OVRSpatialAnchor.
Parameters
spatialAnchor
The component to which this unbound anchor should be bound.
Exceptions
InvalidOperationException
Thrown if this UnboundAnchor does not refer to a valid anchor.
ArgumentNullException
Thrown if spatialAnchor is null.
ArgumentException
Thrown if an anchor is already bound to spatialAnchor .
ArgumentException
Thrown if spatialAnchor is pending creation (see OVRSpatialAnchor.PendingCreation).
InvalidOperationException
Thrown if this UnboundAnchor is already bound to an OVRSpatialAnchor.
void OVRSpatialAnchor.UnboundAnchor.Localize
( Action< UnboundAnchor, bool > onComplete,
double timeout )
Localizes an anchor.
NOTE: This method is obsolete. Use LocalizeAsync instead. To continue using the onComplete callback, use OVRTask<T>.ContinueWith on the returned task.
The delegate supplied to OVRSpatialAnchor.LoadUnboundAnchors receives an array of unbound spatial anchors. You can choose whether to localize each one and be notified when localization completes.
The onComplete delegate receives two arguments:
  • bool: Whether localization was successful
  • UnboundAnchor: The anchor to bind
Upon successful localization, your delegate should instantiate an OVRSpatialAnchor, then bind the UnboundAnchor to the OVRSpatialAnchor by calling UnboundAnchor.BindTo. Once an UnboundAnchor is bound to an OVRSpatialAnchor, it cannot be used again; that is, it cannot be bound to multiple OVRSpatialAnchor components.
Parameters
onComplete
A delegate invoked when localization completes (which may fail). The delegate receives two arguments:
  • UnboundAnchor: The anchor to bind
  • bool: Whether localization was successful
timeout
The timeout, in seconds, to attempt localization, or zero to indicate no timeout.
Exceptions
InvalidOperationException
Thrown if
  • The anchor does not support localization, e.g., because it is invalid.
  • The anchor has already been localized.
  • The anchor is being localized, e.g., because Localize was previously called.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon