Improve mesh processing readability

PiperOrigin-RevId: 721524528
Change-Id: I3af4e25815cbc7517b772826af7d929ea93f8164
This commit is contained in:
Tom Power
2025-01-30 14:40:24 -08:00
committed by Copybara-Service
parent 767be23207
commit 3d9946cff3
3 changed files with 113 additions and 81 deletions
+2
View File
@@ -3014,12 +3014,14 @@ void mjCGeom::Compile(void) {
meshname_.clear();
mesh = nullptr;
} else {
// Retrieve the mesh position for the relevant inertia type.
mjuu_copyvec(meshpos, mesh->GetPosPtr(typeinertia), 3);
}
// apply geom pos/quat as offset
mjuu_frameaccum(pos, quat, meshpos, pmesh->GetQuatPtr(typeinertia));
mjuu_copyvec(pmesh->GetOffsetPosPtr(), meshpos, 3);
// Retrieve the mesh quaternion for the relevant inertia type.
mjuu_copyvec(pmesh->GetOffsetQuatPtr(), pmesh->GetQuatPtr(typeinertia), 4);
}