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

OVRLocatable Struct

Represents the Pose of the anchor.
OVRLocatable extends IOVRAnchorComponent< OVRLocatable >.
OVRLocatable extends IEquatable< OVRLocatable >.

Overview

Properties

SpaceComponentType IOVRAnchorComponent< OVRLocatable >.
Type[Get]
Handle[Get]
bool
IsNull[Get]
Whether this object represents a valid anchor component.
bool
True if this component is enabled and no change to its enabled status is pending.
SpaceComponentType
Type[Get]
ulong
Handle[Get]

Static Fields

static readonly OVRLocatable
Null[Get]
A null representation of an OVRLocatable.

Public Member Functions

FromAnchor
( OVRAnchor anchor )
OVRTask< bool >
SetEnabledAsync
( bool enabled,
double timeout )
Sets the enabled status of this component.
OVRTask< bool >
SetEnabledSafeAsync
( bool enabled,
double timeout )
(Obsolete) Sets the enabled status of this component if it differs from the current enabled state.
bool
Equals
( OVRLocatable other )
Compares this component for equality with other .
override bool
Equals
( object obj )
Compares this component for equality with obj .
override int
Gets a hashcode suitable for use in a Dictionary or HashSet.
override string
Gets a string representation of this component.
bool
Tries to get the TrackingSpacePose representing the position and rotation of this anchor, treated as a scene anchor, in tracking space.
bool
Tries to get the TrackingSpacePose representing the position and rotation of this anchor, treated as a spatial anchor, in tracking space.

Static Public Member Functions

static bool
Compares two components for equality.
static bool
Compares two components for inequality.

Details

Detailed Description

Enabling it will localize the anchor.
This component can be accessed from an OVRAnchor that supports it by calling OVRAnchor.GetComponent<T> from the anchor. This component needs to be enabled before requesting its Pose. See IsEnabled and SetEnabledAsync

Properties

SpaceComponentType IOVRAnchorComponent<OVRLocatable>. OVRLocatable.Type
No description available.
ulong IOVRAnchorComponent<OVRLocatable>. OVRLocatable.Handle
No description available.
bool OVRLocatable.IsNull
Whether this object represents a valid anchor component.
bool OVRLocatable.IsEnabled
True if this component is enabled and no change to its enabled status is pending.
SpaceComponentType OVRLocatable.Type
No description available.
ulong OVRLocatable.Handle
No description available.

Public Statics

readonly OVRLocatable OVRLocatable.Null
A null representation of an OVRLocatable.
Use this to compare with another component to determine whether it is null.

Member Functions

OVRLocatable IOVRAnchorComponent< OVRLocatable >. OVRLocatable.FromAnchor
( OVRAnchor anchor )
No description available.
OVRTask< bool > OVRLocatable.SetEnabledAsync
( bool enabled,
double timeout )
Sets the enabled status of this component.
A component must be enabled in order to access its data or do enable its functionality.
This method is asynchronous. Use the returned task to track the completion of this operation. The task's value indicates whether the operation was successful.
If the current enabled state matches enabled , then the returned task completes immediately with a True result. If there is already a pending change to the enabled state, the new request is queued.
Parameters
enabled
The desired state of the component.
timeout
The timeout, in seconds, for the operation. Use zero to indicate an infinite timeout.
Returns
Returns an OVRTask<T> whose result indicates the result of the operation.
OVRTask< bool > OVRLocatable.SetEnabledSafeAsync
( bool enabled,
double timeout )
(Obsolete) Sets the enabled status of this component if it differs from the current enabled state.
This method is obsolete. Use SetEnabledAsync instead.
Parameters
enabled
The desired state of the component.
timeout
The timeout, in seconds, for the operation. Use zero to indicate an infinite timeout.
Returns
Returns an OVRTask<T> whose result indicates the result of the operation.
bool OVRLocatable.Equals
( OVRLocatable other )
Compares this component for equality with other .
Parameters
other
The other component to compare with.
Returns
True if both components belong to the same OVRAnchor, otherwise false.
override bool OVRLocatable.Equals
( object obj )
Compares this component for equality with obj .
Parameters
obj
The object to compare with.
Returns
True if obj is an OVRLocatable and Equals(OVRLocatable) is true, otherwise false.
override int OVRLocatable.GetHashCode ( )
Gets a hashcode suitable for use in a Dictionary or HashSet.
Returns
A hashcode for this component.
override string OVRLocatable.ToString ( )
Gets a string representation of this component.
Returns
A string representation of this component.
bool OVRLocatable.TryGetSceneAnchorPose
( out TrackingSpacePose pose )
Tries to get the TrackingSpacePose representing the position and rotation of this anchor, treated as a scene anchor, in tracking space.
Parameters
pose
The out TrackingSpacePose which will get filled in.
Returns
True if the request was successful, False otherwise.
Although the request may succeed and provide a valid TrackingSpacePose, actual Position and Rotation provided may not be valid and/or tracked, see TrackingSpacePose for more information on how to use its data.
Scene anchors follow a different transform from the raw OpenXR data than spatial anchors'.
bool OVRLocatable.TryGetSpatialAnchorPose
( out TrackingSpacePose pose )
Tries to get the TrackingSpacePose representing the position and rotation of this anchor, treated as a spatial anchor, in tracking space.
Parameters
pose
The out TrackingSpacePose which will get filled in.
Returns
True if the request was successful, False otherwise.
Although the request may succeed and provide a valid TrackingSpacePose, actual position and rotation provided may not be valid and/or tracked, see TrackingSpacePose for more information on how to use its data.
Spatial anchors follow a different transform from the raw OpenXR data than scene anchors'.

Static Member Functions

static bool OVRLocatable.operator==
( OVRLocatable lhs,
Compares two components for equality.
Parameters
lhs
The component to compare with rhs .
rhs
The component to compare with lhs .
Returns
True if both components belong to the same OVRAnchor, otherwise false.
static bool OVRLocatable.operator!=
( OVRLocatable lhs,
Compares two components for inequality.
Parameters
lhs
The component to compare with rhs .
rhs
The component to compare with lhs .
Returns
True if the components do not belong to the same OVRAnchor, otherwise false.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon