Add mjmGeom to C API.
PiperOrigin-RevId: 605302719 Change-Id: Ib4208e60cf4299473a96f62db2c9dc8c7a5b0b36
This commit is contained in:
committed by
Copybara-Service
parent
3baab3784a
commit
1fe258fb60
@@ -77,11 +77,11 @@ void* mjm_addFreeJoint(mjmBody* bodyspec) {
|
||||
|
||||
|
||||
// add geom to body
|
||||
void* mjm_addGeom(mjmBody* bodyspec, void* defspec) {
|
||||
mjmGeom* mjm_addGeom(mjmBody* bodyspec, void* defspec) {
|
||||
mjCDef* def = static_cast<mjCDef*>(defspec);
|
||||
mjCBody* body = reinterpret_cast<mjCBody*>(bodyspec->element);
|
||||
mjCGeom* geom = body->AddGeom(def);
|
||||
return geom;
|
||||
return &geom->spec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user