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.

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

Properties

BoundingBox : Rect
[Get]
Bounding Box.
Signature
Rect OVRBounded2D.BoundingBox
Handle : ulong IOVRAnchorComponent< OVRBounded2D >.
[Get]
Signature
ulong IOVRAnchorComponent<OVRBounded2D>. OVRBounded2D.Handle
IsEnabled : bool
[Get]
True if this component is enabled and no change to its enabled status is pending.
Signature
bool OVRBounded2D.IsEnabled
IsNull : bool
[Get]
Whether this object represents a valid anchor component.
Signature
bool OVRBounded2D.IsNull
Type : SpaceComponentType IOVRAnchorComponent< OVRBounded2D >.
[Get]
Signature
SpaceComponentType IOVRAnchorComponent<OVRBounded2D>. OVRBounded2D.Type

Methods

Equals ( other )
Compares this component for equality with other .
Signature
bool OVRBounded2D.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 OVRBounded2D.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.
FromAnchor ( anchor )
Signature
OVRBounded2D IOVRAnchorComponent< OVRBounded2D >. OVRBounded2D.FromAnchor(OVRAnchor anchor)
Parameters
anchor: OVRAnchor
GetHashCode ()
Gets a hashcode suitable for use in a Dictionary or HashSet.
Signature
override int OVRBounded2D.GetHashCode()
Returns
override int  A hashcode for this component.
SetEnabledAsync ( enabled , timeout )
Signature
OVRTask< bool > IOVRAnchorComponent< OVRBounded2D >. OVRBounded2D.SetEnabledAsync(bool enabled, double timeout)
Parameters
enabled: bool
timeout: double
ToString ()
Gets a string representation of this component.
Signature
override string OVRBounded2D.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 OVRBounded2D.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 OVRBounded2D.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 true if it successfully retrieves the count, false otherwise.

Static Methods

operator!= ( lhs , rhs )
Compares two components for inequality.
Signature
static bool OVRBounded2D.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 OVRBounded2D.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.