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

OVRTriangleMesh Struct

Extends IOVRAnchorComponent< OVRTriangleMesh >, IEquatable< OVRTriangleMesh >
Represents the Triangle Mesh component of an OVRAnchor.
This component can be accessed from an OVRAnchor that supports it by calling OVRAnchor.GetComponent<T> from the anchor.

Properties

SpaceComponentType IOVRAnchorComponent< OVRTriangleMesh >. Type[Get]
ulong IOVRAnchorComponent< OVRTriangleMesh >. Handle[Get]
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]

Public Statics

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

Member Functions

OVRTask< bool > IOVRAnchorComponent< OVRTriangleMesh >. SetEnabledAsync
( bool enabled,
double timeout )
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 OVRTriangleMesh and Equals(OVRTriangleMesh) 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 triangles in the mesh.
Use this method to get the required sizes of the vertex and triangle index buffers. The length of the indices array passed to TryGetMesh and should be three times triangleCount .This method is thread-safe.
Parameters
vertexCount
The number of vertices in the mesh.
triangleCount
The number of triangles in the mesh. There are three times as many indices.
Returns
True if the counts were retrieved; otherwise, false.
Gets the raw, untransformed triangle mesh.
Gets the triangle mesh.
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 TryGetCounts to determine the required size of each array. Note that indices should be three times the number of triangles (triangleCount) indicated by TryGetCounts.This method is thread-safe.
Parameters
positions
The vertex positions of the mesh.
indices
The triangle indices of the mesh.
Returns
True if the mesh data was retrieved; otherwise, false.
Schedules a job to get an anchor's triangle mesh.
This schedules jobs with the Unity Job system to retrieve the mesh data and then perform the necessary conversion to Unity's coordinate space (see TryGetMeshRawUntransformed).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 TryGetCounts to determine the required size of each array. Note that indices should be three times the number of triangles (triangleCount) indicated by TryGetCounts.If the triangle mesh cannot be retrieved, all indices will be set to zero. Use this to check for success after the job completes. For example, if the first three indices are zero, then the mesh is not valid.
Parameters
positions
The vertex positions of the triangle mesh.
indices
The triangle indices of the triangle mesh.
dependencies
(Optional) A job on which the new jobs will depend.
Returns
Returns the handle associated with the new job.

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