diff options
-rw-r--r-- | engine/src/mesh.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engine/src/mesh.rs b/engine/src/mesh.rs index a9914e7..917e7f7 100644 --- a/engine/src/mesh.rs +++ b/engine/src/mesh.rs @@ -27,11 +27,23 @@ impl Mesh } #[must_use] + pub fn vertices_mut(&mut self) -> &mut [Vertex] + { + &mut self.vertices + } + + #[must_use] pub fn indices(&self) -> Option<&[u32]> { self.indices.as_deref() } + #[must_use] + pub fn indices_mut(&mut self) -> Option<&mut [u32]> + { + self.indices.as_deref_mut() + } + /// Finds the vertex positions that are furthest in every 3D direction. Keep in mind /// that this can be quite time-expensive if the mesh has many vertices. pub fn find_furthest_vertex_positions(&self) -> DirectionPositions<'_> |