Move mjCWrap type to mjsWrap.
PiperOrigin-RevId: 821851540 Change-Id: I53382a8a21312a96aea46eec130f43e7cad70f92
This commit is contained in:
committed by
Copybara-Service
parent
88ac02dad3
commit
59f14485e0
@@ -120,7 +120,7 @@ bool IsNullPose(const T pos[3], const T quat[4]) {
|
||||
// get body id from wrap object
|
||||
int GetBodyIdFromWrap(const mjCWrap* wrap) {
|
||||
if (!wrap || !wrap->obj) return -1;
|
||||
switch (wrap->type) {
|
||||
switch (wrap->Type()) {
|
||||
case mjWRAP_SITE:
|
||||
return static_cast<mjCSite*>(wrap->obj)->Body()->id;
|
||||
case mjWRAP_CYLINDER:
|
||||
@@ -3606,10 +3606,10 @@ void mjCModel::CopyObjects(mjModel* m) {
|
||||
|
||||
// set wraps
|
||||
for (int j=0; j < (int)pte->path.size(); j++) {
|
||||
m->wrap_type[adr+j] = pte->path[j]->type;
|
||||
m->wrap_type[adr+j] = pte->path[j]->Type();
|
||||
m->wrap_objid[adr+j] = pte->path[j]->obj ? pte->path[j]->obj->id : -1;
|
||||
m->wrap_prm[adr+j] = (mjtNum)pte->path[j]->prm;
|
||||
if (pte->path[j]->type == mjWRAP_SPHERE || pte->path[j]->type == mjWRAP_CYLINDER) {
|
||||
if (pte->path[j]->Type() == mjWRAP_SPHERE || pte->path[j]->Type() == mjWRAP_CYLINDER) {
|
||||
m->wrap_prm[adr+j] = (mjtNum)pte->path[j]->sideid;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user