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

OVRRoomMesh Struct

Extends IOVRAnchorComponent< OVRRoomMesh >, IEquatable< OVRRoomMesh >
Represents the polyhedral mesh representation of a room.
This component can be accessed from an OVRAnchor that supports it by calling OVRAnchor.GetComponent<T> from the anchor.
The room mesh component is part of the Meta Quest Scene Model. Read more at Scene Overview.

Public Statics

A null representation of an OVRRoomMesh.
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]

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 OVRRoomMesh and Equals(OVRRoomMesh) 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.
Gets the number of vertices and faces in the room mesh.
Use this method to get the required sizes of the vertex and face buffers. Once these buffers have been created, use these in conjunction with TryGetRoomMesh>.
Parameters
vertexCount
The number of vertices in the room mesh.
faceCount
The number of faces in the room mesh.
Returns
Returns true if the counts were retrieved; otherwise, false.
Gets the room mesh by populating the provided arrays.
The caller owns the memory of the input arrays and is responsible for allocating them to the appropriate size before passing them to this method. Use TryGetRoomMeshCounts to determine the required size of each array.The vertex data provided by this method has been converted from the right-handed coordinate space defined by OpenXR to Unity's coordinate space.
Parameters
vertices
The vertex positions of the room mesh.
faces
The faces of the room mesh.
Returns
Return true if the room mesh data was retrieved; otherwise, false.
Gets the number of indices for a given face of the room mesh.
Use this method to get the required size index buffer. Once the buffer has been created, use it in conjunction with TryGetRoomFaceIndices>.The indices of the face are with respect to the global room mesh vertices, and they form a triangulated planar surface that may be convex and contain interior boundaries (holes).
Parameters
faceUuid
The uuid of the face in question.
faceIndexCount
The number of indices in the face of the room mesh.
Returns
Returns true if the count was retrieved; otherwise, false.
Gets the indices for a face in the room mesh.
The caller owns the memory of the input array and is responsible for allocating it to the appropriate size before passing it to this method. Use TryGetRoomFaceIndexCount to determine the required size of the array.The index data provided by this method has been converted from the right-handed coordinate space defined by OpenXR to Unity's coordinate space.The indices of the face are with respect to the global room mesh vertices, and they form a triangulated planar surface that may be convex and contain interior boundaries (holes).
Parameters
faceUuid
The uuid of the face in question.
faceIndices
The triangle indices of the face of the room mesh.
Returns
Returns true if the face index data was retrieved; otherwise, false.

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?