Fix bug in horizon code in nativeccd where parallel faces are included in horizon.

PiperOrigin-RevId: 742687622
Change-Id: I4a180cb9c7451e0a2c22ffd77b7b6f6fd68836a4
This commit is contained in:
Kyle Bayes
2025-04-01 07:20:17 -07:00
committed by Copybara-Service
parent 305b68ecbf
commit 08d22baea1
2 changed files with 67 additions and 1 deletions
+1 -1
View File
@@ -1271,7 +1271,7 @@ static int horizonRec(Polytope* pt, Face* face, int e) {
mjtNum dist2 = face->dist * face->dist;
// v is visible from w so it is deleted and adjacent faces are checked
if (dot3(face->v, pt->horizon.w) >= dist2) {
if (dot3(face->v, pt->horizon.w) > dist2) {
deleteFace(pt, face);
// recursively search the adjacent faces on the next two edges