From e0fa99bad4c91eda5c045890214f5ba497c730f1 Mon Sep 17 00:00:00 2001 From: phkahler <14852918+phkahler@users.noreply.github.com> Date: Mon, 20 Jul 2020 12:51:07 -0400 Subject: [PATCH] remove another redundant pass checking earness --- src/srf/triangulate.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/srf/triangulate.cpp b/src/srf/triangulate.cpp index 2c9f1fb..e6cd6e4 100644 --- a/src/srf/triangulate.cpp +++ b/src/srf/triangulate.cpp @@ -297,19 +297,17 @@ void SContour::UvTriangulateInto(SMesh *m, SSurface *srf) { int i; // Clean the original contour by removing any zero-length edges. + // initialize eartypes to unknown while we're going over them. l.ClearTags(); + l[0].ear = EarType::UNKNOWN; for(i = 1; i < l.n; i++) { + l[i].ear = EarType::UNKNOWN; if((l[i].p).Equals(l[i-1].p)) { l[i].tag = 1; } } l.RemoveTagged(); - // Now calculate the ear-ness of each vertex - for(i = 0; i < l.n; i++) { - (l[i]).ear = IsEar(i, scaledEps) ? EarType::EAR : EarType::NOT_EAR; - } - bool toggle = false; while(l.n > 3) { int bestEar = -1;