Try replacing next_handle_from
based iteration
#32
Labels
area:datastructures
Area: mesh datastructures
category:improvement
Category: Improvement
priority:medium
Priority: Medium
Iterating over all vertices/faces/edges of a mesh is currently implemented via
next_vertex_handle_from
andlast_vertex_handle
. This was originally done to work around the lack of GATs. Now we have GATs and could solve this properly... except forvertex_handles_mut
: an iterator that iterates over vertex handles but also gives mutable access to the underlying mesh. It's not possible to easily implement it due to borrowing thevertices.iter()
immutable for the handles, but also the whole mesh. So it is necessary to pull out the iteration logic instead of using the provided one of the relevantDenseMap
.I'm not yet sure how to best solve this. Maybe use the GAT solution for
element_handles()
andelements()
, but still use the manual iteration for themut
iterator. But that should probably be hidden as well, i.e. have aIterMut<'s>
type in the trait and remove thenext_handle_from
functions from theMesh
trait.The text was updated successfully, but these errors were encountered: