From 8b188bda52980ce69aa348dcc8dfe8c211c66803 Mon Sep 17 00:00:00 2001 From: Matthew Jensen Date: Sat, 17 Jun 2023 11:18:30 -0400 Subject: [PATCH] Consider all triangles for retention in Delaunay Triangulation --- core/math/delaunay_2d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/math/delaunay_2d.h b/core/math/delaunay_2d.h index cf7ba8d48ed..fc70724308e 100644 --- a/core/math/delaunay_2d.h +++ b/core/math/delaunay_2d.h @@ -145,7 +145,7 @@ public: // Filter out the triangles containing vertices of the bounding triangle. int preserved_count = 0; Triangle *triangles_ptrw = triangles.ptrw(); - for (int i = 0; i < triangles.size() - 1; i++) { + for (int i = 0; i < triangles.size(); i++) { if (!(triangles[i].points[0] >= point_count || triangles[i].points[1] >= point_count || triangles[i].points[2] >= point_count)) { triangles_ptrw[preserved_count] = triangles[i]; preserved_count++;