remove another redundant pass checking earness

pull/665/head
phkahler 2020-07-20 12:51:07 -04:00
parent 2640034124
commit e0fa99bad4
1 changed files with 3 additions and 5 deletions

View File

@ -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;