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

OVRBounded2D Struct

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

Static Fields

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

Properties

BoundingBox : Rect
[Get]
The 2D bounding box of the plane.
The bounding box is defined relative to the plane anchor (OVRAnchor).
Signature
Rect BoundingBox
IsEnabled : bool
[Get]
True if this component is enabled and no change to its enabled status is pending.
Signature
bool IsEnabled
IsNull : bool
[Get]
Whether this object represents a valid anchor component.
Signature
bool IsNull

Methods

Equals ( other )
Compares this component for equality with other .
Signature
bool Equals(OVRBounded2D other)
Parameters
other: OVRBounded2D  The other component to compare with.
Returns
bool  True if both components belong to the same OVRAnchor, otherwise false.
Equals ( obj )
Compares this component for equality with obj .
Signature
override bool Equals(object obj)
Parameters
obj: object  The object to compare with.
Returns
override bool  True if obj is an OVRBounded2D and Equals(OVRBounded2D) is true, otherwise false.
GetHashCode ()
Gets a hashcode suitable for use in a Dictionary or HashSet.
Signature
override int GetHashCode()
Returns
override int  A hashcode for this component.
ToString ()
Gets a string representation of this component.
Signature
override string ToString()
Returns
override string  A string representation of this component.
TryGetBoundaryPoints ( positions )
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.
Signature
bool TryGetBoundaryPoints(NativeArray< Vector2 > positions)
Parameters
positions: NativeArray< Vector2 >  The array that will get populated with the boundary points contained in the Bounded2D component of the Anchor.
Returns
bool true if it successfully populates the positions array with the boundary points.
Throws
ArgumentException  Thrown when positions has not been created.
TryGetBoundaryPointsCount ( count )
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.
Signature
bool TryGetBoundaryPointsCount(out int count)
Parameters
count: out int  The number of boundary points contained in the Bounded2D component of the Anchor, as an out parameter.
Returns
bool  Returns true if it successfully retrieves the count, false otherwise.

Static Methods

operator!= ( lhs , rhs )
Compares two components for inequality.
Signature
static bool operator!=(OVRBounded2D lhs, OVRBounded2D rhs)
Parameters
lhs: OVRBounded2D  The component to compare with rhs .
rhs: OVRBounded2D  The component to compare with lhs .
Returns
bool  True if the components do not belong to the same OVRAnchor, otherwise false.
operator== ( lhs , rhs )
Compares two components for equality.
Signature
static bool operator==(OVRBounded2D lhs, OVRBounded2D rhs)
Parameters
lhs: OVRBounded2D  The component to compare with rhs .
rhs: OVRBounded2D  The component to compare with lhs .
Returns
bool  True if both components belong to the same OVRAnchor, otherwise false.