MeshUnsafeLock
ReferencesPermits access to the underlying mesh raw data structures in an unsafe way.
Remarks: This lock object needs to be disposed before using the Mesh in other calculations and this can be achieved with the using keyword (Using in VB.Net).
Methods
Retrieves a pointer to the raw mesh face normals array, which uses vectors defined with single precision floating point numbers, or throws an exception if none is available.
Parameters:
| length (out int) | The length of the array. This value is returned by reference (out in C#). |
Returns: The beginning of the vertex array. Item 0 is the first vertex, and item length-1 is the last valid one.
Exceptions:
| InvalidOperationException | The mesh does not have face normals. |
Retrieves a pointer to the raw faces array, which uses 4 integers for each face. MeshFace.
Parameters:
| length (out int) | The length of the array. This value is returned by reference (out in C#). |
Returns: The beginning of the vertex array. Item 0 is the first vertex, and item length-1 is the last valid one.
Exceptions:
| InvalidOperationException | The mesh does not have face normals. |
Retrieves a pointer to the raw mesh vertex normal array, which uses vectors defined with single precision floating point numbers, or throws an exception if none is available.
Parameters:
| length (out int) | The length of the array. This value is returned by reference (out in C#). |
Returns: The beginning of the vertex array. Item 0 is the first vertex, and item length-1 is the last valid one.
Exceptions:
| InvalidOperationException | The mesh does not have vertex normals. |
public void Release()
Releases the lock and updates the underlying unmanaged data structures.
Retrieves a pointer to the raw mesh vertex colors array, which uses RGBA integers or throws an exception if none is available.
Parameters:
| length (out int) | The length of the array. This value is returned by reference (out in C#). |
Returns: The beginning of the vertex array. Item 0 is the first vertex, and item length-1 is the last valid one.
Exceptions:
| InvalidOperationException | The mesh does not have vertex normals. |
Retrieves a pointer to the raw mesh vertex array, which uses coordinates defined with double precision floating point numbers, or throws an exception if none is available.
Remarks: When running this method for writing and if the mesh has also a single precision array, the array is synchronized if the pointer to the single precision array was not requested. Otherwise, it is up to the caller to ensure that the mesh vertices are kept synchronized, by setting both arrays to the required values.
Parameters:
| length (out int) | The length of the array. This value is returned by reference (out in C#). |
Returns: The beginning of the vertex array. Item 0 is the first vertex, and item length-1 is the last valid one. If no array is available, null is returned.
Exceptions:
| InvalidOperationException | The mesh does not use double precision vertices. |
Retrieves a pointer to the raw mesh vertex array, which uses coordinates defined with single precision floating point numbers, or null if none is available.
Remarks: When running this method for writing, it is up to the caller to ensure that the mesh has no double precision array that needs to be synchronized. Otherwise, also the double precision array must be synchronized.
Parameters:
| length (out int) | The length of the array. This value is returned by reference (out in C#). 0 is returned when there is no single precision array. |
Returns: The beginning of the vertex array. Item 0 is the first vertex, and item length-1 is the last valid one. If no array is available, null is returned.
Exceptions:
| InvalidOperationException | The mesh does not use single precision vertices. |