Mesh: Rewrite split edges algorithm #110661

Merged
Hans Goudey merged 78 commits from HooglyBoogly/blender:split-edges-rewrite-2 into main 2023-08-30 14:23:49 +02:00
1 changed files with 4 additions and 0 deletions
Showing only changes of commit d600c69bfa - Show all commits

View File

@ -317,6 +317,10 @@ static OrderedEdge edge_from_corner(const OffsetIndices<int> faces,
return OrderedEdge(corner_verts[corner], corner_verts[corner_next]);
}
/**
* Add a new edge to the vector (which is expected to be small), detecting duplicates and storing
* them in the same index.
*/
static int add_edge_or_find_index(Vector<OrderedEdge> &vector, const OrderedEdge value)
{
const int index = vector.first_index_of_try(value);