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:
committed by
Copybara-Service
parent
27742da9d7
commit
c943797591
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user