Null
: readonly OVRTriangleMesh |
A null representation of an OVRTriangleMesh.
Use this to compare with another component to determine whether it is null.
Signature
readonly OVRTriangleMesh Null |
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 |
Equals
(
other
)
|
Compares this component for equality with other .
Signature
bool Equals(OVRTriangleMesh other) Parameters |
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 OVRTriangleMesh and Equals(OVRTriangleMesh) 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.
|
ScheduleGetMeshJob
(
positions
, indices
, dependencies
)
|
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.
Signature
JobHandle ScheduleGetMeshJob(NativeArray< Vector3 > positions, NativeArray< int > indices, JobHandle dependencies=default) Parameters positions: NativeArray< Vector3 >
The vertex positions of the triangle mesh.
indices: NativeArray< int >
The triangle indices of the triangle mesh.
dependencies: JobHandle
(Optional) A job on which the new jobs will depend.
Returns JobHandle
Returns the handle associated with the new job.
|
ToString
()
|
Gets a string representation of this component.
Signature
override string ToString() Returns override string
A string representation of this component.
|
TryGetCounts
(
vertexCount
, triangleCount
)
|
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 triangleCount .
This method is thread-safe.
Signature
bool TryGetCounts(out int vertexCount, out int triangleCount) Parameters vertexCount: out int
The number of vertices in the mesh.
triangleCount: out int
The number of triangles in the mesh. There are three times as many indices.
Returns bool
Returns true if the counts were retrieved; otherwise, false.
|
TryGetMesh
(
positions
, indices
)
|
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.
Signature
bool TryGetMesh(NativeArray< Vector3 > positions, NativeArray< int > indices) Parameters positions: NativeArray< Vector3 >
The vertex positions of the mesh.
indices: NativeArray< int >
The triangle indices of the mesh.
Returns bool
Returns true if the mesh data was retrieved; otherwise, false.
|
TryGetMeshRawUntransformed
(
positions
, indices
)
|
Gets the raw, untransformed triangle mesh.
Signature
bool TryGetMeshRawUntransformed(NativeArray< Vector3 > positions, NativeArray< int > indices) Parameters positions: NativeArray< Vector3 >
The vertex positions of the mesh.
indices: NativeArray< int >
The triangle indices of the mesh.
Returns bool
Returns true if the mesh data was retrieved; otherwise, false.
|
operator!=
(
lhs
, rhs
)
|
Compares two components for inequality.
Signature
static bool operator!=(OVRTriangleMesh lhs, OVRTriangleMesh rhs) Parameters |
operator==
(
lhs
, rhs
)
|
Compares two components for equality.
Signature
static bool operator==(OVRTriangleMesh lhs, OVRTriangleMesh rhs) Parameters |