check, goto

This commit is contained in:
Irlan 2018-04-23 01:11:09 -03:00
parent 77a193267f
commit c9dfa30af5

View File

@ -610,6 +610,12 @@ bool qhHull::MergeFace(qhFace* rightFace)
{ {
qhFace* leftFace = e->twin->face; qhFace* leftFace = e->twin->face;
if (leftFace == rightFace)
{
e = e->next;
continue;
}
float32 d1 = b3Distance(leftFace->center, rightFace->plane); float32 d1 = b3Distance(leftFace->center, rightFace->plane);
float32 d2 = b3Distance(rightFace->center, leftFace->plane); float32 d2 = b3Distance(rightFace->center, leftFace->plane);
@ -617,15 +623,11 @@ bool qhHull::MergeFace(qhFace* rightFace)
{ {
// Convex // Convex
e = e->next; e = e->next;
continue;
} }
else else
{ {
// Concave or coplanar // Concave or coplanar
if (leftFace == rightFace)
{
e = e->next;
continue;
}
// Move left vertices into right // Move left vertices into right
qhVertex* v = leftFace->conflictList.head; qhVertex* v = leftFace->conflictList.head;