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

OVRBounded2D Struct

Extends IOVRAnchorComponent< OVRBounded2D >, IEquatable< OVRBounded2D >
Represents a plane described by its Rect and boundary points.
This component can be accessed from an OVRAnchor that supports it by calling OVRAnchor.GetComponent<T> from the anchor.
The bounded 2D component is part of the Meta Quest Scene Model. Read more at Scene Overview.

Public Statics

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

Properties

Whether this object represents a valid anchor component.
True if this component is enabled and no change to its enabled status is pending.
SpaceComponentType Type[Get]
ulong Handle[Get]
The 2D bounding box of the plane.
The bounding box is defined relative to the plane anchor (OVRAnchor).
Returns
Returns the Rect representing the 2D Bounding Box of the Anchor this component is attached to.
Exceptions
InvalidOperationException
If it fails to retrieve the Bounding Box.

Member Functions

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.
Compares this component for equality with obj .
Parameters
obj
The object to compare with.
Returns
True if obj is an OVRBounded2D and Equals(OVRBounded2D) is true, otherwise false.
Gets a hashcode suitable for use in a Dictionary or HashSet.
Returns
A hashcode for this component.
Gets a string representation of this component.
Returns
A string representation of this component.
Retrieves the number of boundary points contained in an Anchor with an enabled Bounded2D component.
This is the first part of the two-calls idiom for retrieving boundary points. TryGetBoundaryPoints to actually get those points.
Parameters
count
The number of boundary points contained in the Bounded2D component of the Anchor, as an out parameter.
Returns
Returns true if it successfully retrieves the count, false otherwise.
Retrieves the boundary points contained in an Anchor with an enabled Bounded2D component.
This is the second part of the two-calls idiom for retrieving boundary points. It is expected for the positions to be created and with enough capacity to contain the boundary points.
Parameters
positions
The array that will get populated with the boundary points contained in the Bounded2D component of the Anchor.
Returns
true if it successfully populates the positions array with the boundary points.
Exceptions
ArgumentException
Thrown when positions has not been created.

Static Member Functions

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.
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