Remove unnecessary loop from mj_collideOBB.

PiperOrigin-RevId: 780629489
Change-Id: I715cd1f72012c0655997ba4c967fa7b5b8731d54
This commit is contained in:
Taylor Howell
2025-07-08 10:49:25 -07:00
committed by Copybara-Service
parent 14972d2490
commit 13621879c6
+7 -9
View File
@@ -548,16 +548,14 @@ int mj_collideOBB(const mjtNum aabb1[6], const mjtNum aabb2[6],
// compute centers in local coordinates
if (product == NULL) {
for (int i=0; i < 2; i++) { // bounding boxes
for (int j=0; j < 3; j++) { // axes
if (xmat[i]) {
mju_mulMatVec3(xcenter[i], xmat[i], aabb[i]);
} else {
mju_copy3(xcenter[i], aabb[i]);
}
if (xmat[i]) {
mju_mulMatVec3(xcenter[i], xmat[i], aabb[i]);
} else {
mju_copy3(xcenter[i], aabb[i]);
}
if (xpos[i]) {
mju_addTo3(xcenter[i], xpos[i]);
}
if (xpos[i]) {
mju_addTo3(xcenter[i], xpos[i]);
}
}
}