Add mjmBodyPair to C API.

PiperOrigin-RevId: 606997065
Change-Id: Iefc2dff6ae942ce93ca83ec5f5fe9d7ae8bb6a40
This commit is contained in:
Alessio Quaglino
2024-02-14 08:39:01 -08:00
committed by Copybara-Service
parent c9e7586499
commit 80a986c0f5
7 changed files with 95 additions and 31 deletions
+9
View File
@@ -185,6 +185,15 @@ mjmPair* mjm_addPair(void* model, void* defspec) {
// add pair exclusion to model
mjmExclude* mjm_addExclude(void* model) {
mjCModel* modelC = static_cast<mjCModel*>(model);
mjCBodyPair* bodypair = modelC->AddExclude();
return &bodypair->spec;
}
// add equality to model
mjmEquality* mjm_addEquality(void* model, void* defspec) {
mjCModel* modelC = static_cast<mjCModel*>(model);