Added remove_indices to Mesh (#11733)

# Objective

- Fixes #11727 

## Solution

- Added `Mesh::remove_indices(&mut self) -> Option<Indices>`
This commit is contained in:
Lynn 2024-02-06 08:41:01 +01:00 committed by GitHub
parent 9180be8069
commit d4132f661a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -350,6 +350,12 @@ impl Mesh {
self.indices.as_mut()
}
/// Removes the vertex `indices` from the mesh and returns them.
#[inline]
pub fn remove_indices(&mut self) -> Option<Indices> {
std::mem::take(&mut self.indices)
}
/// Computes and returns the index data of the mesh as bytes.
/// This is used to transform the index data into a GPU friendly format.
pub fn get_index_buffer_bytes(&self) -> Option<&[u8]> {