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

OVRRoomLayout Struct

Extends IEquatable< OVRRoomLayout >
Represents a room described by its floor, ceiling and walls OVRAnchors.
This component can be accessed from an OVRAnchor that supports it by calling OVRAnchor.GetComponent<T> from the anchor.

Static Fields

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

Properties

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

Methods

Equals ( other )
Compares this component for equality with other .
Signature
bool OVRRoomLayout.Equals(OVRRoomLayout other)
Parameters
other: OVRRoomLayout  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 OVRRoomLayout.Equals(object obj)
Parameters
obj: object  The object to compare with.
Returns
override bool  True if obj is an OVRRoomLayout and Equals(OVRRoomLayout) is true, otherwise false.
FetchAnchorsAsync ( anchors )
Fetches the anchors contained in the Room Layout.
Dispose of the returned task if you don't use the results.
Signature
OVRTask< OVRResult< List< OVRAnchor >, OVRAnchor.FetchResult > > OVRRoomLayout.FetchAnchorsAsync(List< OVRAnchor > anchors)
Parameters
anchors: List< OVRAnchor >  List that will get cleared and populated with the requested anchors.
Returns
OVRTask< OVRResult< List< OVRAnchor >, OVRAnchor.FetchResult > >  A task that will eventually let you test if the fetch was successful or not. If the result is true, then the anchors parameter has been populated with the requested anchors.
Throws
InvalidOperationException  Thrown if the method fails to retrieve the Room Layout. This is usually because the anchor does not have a RoomLayout component. ArgumentNullException  Thrown if anchors is null.
FetchLayoutAnchorsAsync ( anchors )
(Obsolete) Asynchronous method that fetches anchors contained in the Room Layout.
DeprecatedThis method is obsolete. Use FetchAnchorsAsync instead.
Dispose of the returned task if you don't use the results
Signature
OVRTask< bool > OVRRoomLayout.FetchLayoutAnchorsAsync(List< OVRAnchor > anchors)
Parameters
anchors: List< OVRAnchor >  List that will get cleared and populated with the requested anchors.
Returns
OVRTask< bool >  A task that will eventually let you test if the fetch was successful or not. If the result is true, then the anchors parameter has been populated with the requested anchors.
Throws
InvalidOperationException  If it fails to retrieve the Room Layout ArgumentNullException  If parameter anchors is null
FromAnchor ( anchor )
Signature
OVRRoomLayout IOVRAnchorComponent< OVRRoomLayout >. OVRRoomLayout.FromAnchor(OVRAnchor anchor)
Parameters
anchor: OVRAnchor
GetHashCode ()
Gets a hashcode suitable for use in a Dictionary or HashSet.
Signature
override int OVRRoomLayout.GetHashCode()
Returns
override int  A hashcode for this component.
SetEnabledAsync ( enabled , timeout )
Signature
OVRTask< bool > IOVRAnchorComponent< OVRRoomLayout >. OVRRoomLayout.SetEnabledAsync(bool enabled, double timeout)
Parameters
enabled: bool
timeout: double
ToString ()
Gets a string representation of this component.
Signature
override string OVRRoomLayout.ToString()
Returns
override string  A string representation of this component.
TryGetRoomLayout ( ceiling , floor , walls )
Tries to get the Ceiling, Floor and Walls unique identifiers.
These can then be used to Fetch their anchors.
Signature
bool OVRRoomLayout.TryGetRoomLayout(out Guid ceiling, out Guid floor, out Guid[] walls)
Parameters
ceiling: out Guid  Out Guid representing the ceiling of the room.
floor: out Guid  Out Guid representing the floor of the room.
walls: out Guid[]  Out array of Guids representing the walls of the room.
Returns
bool  bool true if the request succeeds and false if it fails.

Static Methods

operator!= ( lhs , rhs )
Compares two components for inequality.
Signature
static bool OVRRoomLayout.operator!=(OVRRoomLayout lhs, OVRRoomLayout rhs)
Parameters
lhs: OVRRoomLayout  The component to compare with rhs .
rhs: OVRRoomLayout  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 OVRRoomLayout.operator==(OVRRoomLayout lhs, OVRRoomLayout rhs)
Parameters
lhs: OVRRoomLayout  The component to compare with rhs .
rhs: OVRRoomLayout  The component to compare with lhs .
Returns
bool  True if both components belong to the same OVRAnchor, otherwise false.