Fix a bug in triangle-box filter that caused missing Octree leaves.

PiperOrigin-RevId: 787955811
Change-Id: I40ad0f9219cbe5d5757b9345b1de495cba50d306
This commit is contained in:
Alessio Quaglino
2025-07-28 04:39:58 -07:00
committed by Copybara-Service
parent e4eb654573
commit 8db2413c84
+1 -1
View File
@@ -640,7 +640,7 @@ static bool boxTriangle(const Triangle& v, const double aamm[6]) {
int c = (a + 2) % 3;
for (int i = 0; i < 3; i++) {
double sign = n[a] >= 0 ? 1 : -1;
double ne[2] = {-e[i][c] * sign, -e[i][b] * sign};
double ne[2] = {-e[i][c] * sign, e[i][b] * sign};
double vi[2] = {v[i][b], v[i][c]};
double d = -dot2(ne, vi) + mju_max(0, size[b]*ne[0]) + mju_max(0, size[c]*ne[1]);
double p[2] = {aamm[b], aamm[c]};