Add copy constructor and assignment to mjCModel.
PiperOrigin-RevId: 616850780 Change-Id: I7fedab2efa2a90fd7ce952eac4e195f77c5ff5bc
This commit is contained in:
committed by
Copybara-Service
parent
de918a8b2d
commit
372aa021d0
@@ -36,6 +36,14 @@ mjSpec* mjm_createSpec() {
|
||||
|
||||
|
||||
|
||||
// copy model
|
||||
mjSpec* mjm_copySpec(const mjSpec* s) {
|
||||
mjCModel* modelC = new mjCModel(*reinterpret_cast<mjCModel*>(s->element));
|
||||
return &modelC->spec;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// copy back model
|
||||
void mjm_copyBack(mjSpec* s, const mjModel* m) {
|
||||
mjCModel* modelC = reinterpret_cast<mjCModel*>(s->element);
|
||||
|
||||
Reference in New Issue
Block a user