Add mjmPair to C API.
PiperOrigin-RevId: 606274243 Change-Id: I15e2a38096a61bc1377a666c96113ae20ce3ed59
This commit is contained in:
committed by
Copybara-Service
parent
72cf304e2b
commit
13d6eeacdd
+11
-1
@@ -137,7 +137,7 @@ mjmFrame* mjm_addFrame(mjmBody* bodyspec, mjmFrame* parentframe) {
|
||||
|
||||
|
||||
|
||||
// Add material to model.
|
||||
// add material to model
|
||||
mjmMaterial* mjm_addMaterial(void* model, void* defspec) {
|
||||
mjCModel* modelC = static_cast<mjCModel*>(model);
|
||||
mjCDef* def = static_cast<mjCDef*>(defspec);
|
||||
@@ -147,6 +147,16 @@ mjmMaterial* mjm_addMaterial(void* model, void* defspec) {
|
||||
|
||||
|
||||
|
||||
// add pair to model
|
||||
mjmPair* mjm_addPair(void* model, void* defspec) {
|
||||
mjCModel* modelC = static_cast<mjCModel*>(model);
|
||||
mjCDef* def = static_cast<mjCDef*>(defspec);
|
||||
mjCPair* pair = modelC->AddPair(def);
|
||||
return &pair->spec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// add equality to model
|
||||
mjmEquality* mjm_addEquality(void* model, void* defspec) {
|
||||
mjCModel* modelC = static_cast<mjCModel*>(model);
|
||||
|
||||
Reference in New Issue
Block a user