Do not modify mesh position when fitting a geom to the mesh AABB.

Also, unify the meaning of fitting a geom to an AABB: it now means to find the smallest geom such that its AABB contains the mesh AABB.

Fixes #2881.

PiperOrigin-RevId: 817097544
Change-Id: I883c686feffa803bd16ba461db24a474dfec7712
This commit is contained in:
Alessio Quaglino
2025-10-09 03:04:14 -07:00
committed by Copybara-Service
parent 3a299c49ca
commit 98682ae284
7 changed files with 41 additions and 63 deletions
+1 -1
View File
@@ -1186,7 +1186,7 @@ class mjCMesh: public mjCMesh_, private mjsMesh {
double* GetQuatPtr(); // get orientation
double* GetInertiaBoxPtr(); // get inertia box
double GetVolumeRef() const; // get volume
void FitGeom(mjCGeom* geom, double* meshpos); // approximate mesh with simple geom
void FitGeom(mjCGeom* geom, double center[3]); // approximate mesh with simple geom
bool HasTexcoord() const; // texcoord not null
void DelTexcoord(); // delete texcoord
bool IsVisual(void) const { return visual_; } // is geom visual