Make shellinertia ignore exactmeshinertia, which is only used for legacy volume computations. Fixes #759.

PiperOrigin-RevId: 524884880
Change-Id: Ia5b64ee33802866f792cdad4acfec6d9baf2a9e9
This commit is contained in:
Alessio Quaglino
2023-04-17 10:29:36 -07:00
committed by Copybara-Service
parent 27742da9d7
commit c943797591
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1201,7 +1201,7 @@ double mjCGeom::GetVolume(void) {
}
mjCMesh* pmesh = model->meshes[meshid];
if (model->exactmeshinertia) {
if (model->exactmeshinertia || typeinertia==mjSHELL_MESH) {
return pmesh->GetVolumeRef(typeinertia);
} else {
return pmesh->boxsz_volume[0]*pmesh->boxsz_volume[1]*pmesh->boxsz_volume[2]*8;