Replace name attribute with setters and getters in the C API of mjSpec.
PiperOrigin-RevId: 778816015 Change-Id: Ieffb7a5bce37e887ff009f9a02d2434435e79ca1
This commit is contained in:
committed by
Copybara-Service
parent
1c5d47c94b
commit
594e17074a
@@ -1341,6 +1341,19 @@ mjsPlugin* mjs_asPlugin(mjsElement* element) {
|
||||
|
||||
|
||||
|
||||
// set element name
|
||||
void mjs_setName(mjsElement* element, const char* name) {
|
||||
if (element->elemtype == mjOBJ_DEFAULT) {
|
||||
mjCDef* def = static_cast<mjCDef*>(element);
|
||||
def->name = std::string(name);
|
||||
return;
|
||||
}
|
||||
mjCBase* baseC = static_cast<mjCBase*>(element);
|
||||
baseC->name = std::string(name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// copy buffer to destination buffer
|
||||
void mjs_setBuffer(mjByteVec* dest, const void* array, int size) {
|
||||
const std::byte* buffer = static_cast<const std::byte*>(array);
|
||||
@@ -1430,6 +1443,16 @@ void mjs_setDouble(mjDoubleVec* dest, const double* array, int size) {
|
||||
|
||||
|
||||
|
||||
// get name
|
||||
mjString* mjs_getName(mjsElement* element) {
|
||||
if (element->elemtype == mjOBJ_DEFAULT) {
|
||||
return &(static_cast<mjCDef*>(element)->name);
|
||||
}
|
||||
return &(static_cast<mjCBase*>(element)->name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// get string
|
||||
const char* mjs_getString(const mjString* source) {
|
||||
return source->c_str();
|
||||
|
||||
@@ -339,6 +339,9 @@ MJAPI mjsPlugin* mjs_asPlugin(mjsElement* element);
|
||||
|
||||
//---------------------------------- Attribute setters ---------------------------------------------
|
||||
|
||||
// Set element's name.
|
||||
MJAPI void mjs_setName(mjsElement* element, const char* name);
|
||||
|
||||
// Copy buffer.
|
||||
MJAPI void mjs_setBuffer(mjByteVec* dest, const void* array, int size);
|
||||
|
||||
@@ -375,6 +378,9 @@ MJAPI void mjs_setPluginAttributes(mjsPlugin* plugin, void* attributes);
|
||||
|
||||
//---------------------------------- Attribute getters ---------------------------------------------
|
||||
|
||||
// Get element's name.
|
||||
MJAPI mjString* mjs_getName(mjsElement* element);
|
||||
|
||||
// Get string contents.
|
||||
MJAPI const char* mjs_getString(const mjString* source);
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ bool mjCComposite::MakeCable(mjCModel* model, mjsBody* body, char* error, int er
|
||||
|
||||
// add name to model
|
||||
mjsText* pte = mjs_addText(&model->spec);
|
||||
mjs_setString(pte->name, ("composite_" + prefix).c_str());
|
||||
mjs_setName(pte->element, ("composite_" + prefix).c_str());
|
||||
mjs_setString(pte->data, ("rope_" + prefix).c_str());
|
||||
|
||||
// populate uservert if not specified
|
||||
@@ -372,7 +372,7 @@ mjsBody* mjCComposite::AddCableBody(mjCModel* model, mjsBody* body, int ix,
|
||||
|
||||
// add body
|
||||
body = mjs_addBody(body, 0);
|
||||
mjs_setString(body->name, this_body);
|
||||
mjs_setName(body->element, this_body);
|
||||
if (first) {
|
||||
mjuu_setvec(body->pos, offset[0]+uservert[3*ix],
|
||||
offset[1]+uservert[3*ix+1],
|
||||
@@ -391,7 +391,7 @@ mjsBody* mjCComposite::AddCableBody(mjCModel* model, mjsBody* body, int ix,
|
||||
// add geom
|
||||
mjsGeom* geom = mjs_addGeom(body, &def[0].spec);
|
||||
mjs_setDefault(geom->element, mjs_getDefault(body->element));
|
||||
mjs_setString(geom->name, txt_geom);
|
||||
mjs_setName(geom->element, txt_geom);
|
||||
if (def[0].spec.geom->type == mjGEOM_CYLINDER ||
|
||||
def[0].spec.geom->type == mjGEOM_CAPSULE) {
|
||||
mjuu_zerovec(geom->fromto, 6);
|
||||
@@ -422,7 +422,7 @@ mjsBody* mjCComposite::AddCableBody(mjCModel* model, mjsBody* body, int ix,
|
||||
jnt->damping = jnt->type == mjJNT_FREE ? 0 : jnt->damping;
|
||||
jnt->armature = jnt->type == mjJNT_FREE ? 0 : jnt->armature;
|
||||
jnt->frictionloss = jnt->type == mjJNT_FREE ? 0 : jnt->frictionloss;
|
||||
mjs_setString(jnt->name, this_joint);
|
||||
mjs_setName(jnt->element, this_joint);
|
||||
}
|
||||
|
||||
// exclude contact pair
|
||||
@@ -436,7 +436,7 @@ mjsBody* mjCComposite::AddCableBody(mjCModel* model, mjsBody* body, int ix,
|
||||
if (last || first) {
|
||||
mjsSite* site = mjs_addSite(body, &def[0].spec);
|
||||
mjs_setDefault(site->element, mjs_getDefault(body->element));
|
||||
mjs_setString(site->name, txt_site);
|
||||
mjs_setName(site->element, txt_site);
|
||||
mjuu_setvec(site->pos, last ? length : 0, 0, 0);
|
||||
mjuu_setvec(site->quat, 1, 0, 0, 0);
|
||||
}
|
||||
@@ -480,7 +480,7 @@ void mjCComposite::MakeSkin2(mjCModel* model, mjtNum inflate) {
|
||||
// add skin, set name and material
|
||||
mjsSkin* skin = mjs_addSkin(&model->spec);
|
||||
mju::sprintf_arr(txt, "%sSkin", prefix.c_str());
|
||||
mjs_setString(skin->name, txt);
|
||||
mjs_setName(skin->element, txt);
|
||||
mjs_setString(skin->material, skinmaterial.c_str());
|
||||
mjuu_copyvec(skin->rgba, skinrgba, 4);
|
||||
skin->inflate = inflate;
|
||||
@@ -967,7 +967,7 @@ void mjCComposite::MakeSkin2Subgrid(mjCModel* model, mjtNum inflate) {
|
||||
char txt[100];
|
||||
mjsSkin* skin = mjs_addSkin(&model->spec);
|
||||
mju::sprintf_arr(txt, "%sSkin", prefix.c_str());
|
||||
mjs_setString(skin->name, txt);
|
||||
mjs_setName(skin->element, txt);
|
||||
mjs_setString(skin->material, skinmaterial.c_str());
|
||||
mjuu_copyvec(skin->rgba, skinrgba, 4);
|
||||
skin->inflate = inflate;
|
||||
|
||||
@@ -108,7 +108,7 @@ bool mjCFlexcomp::Make(mjsBody* body, char* error, int error_sz) {
|
||||
type == mjFCOMPTYPE_GMSH);
|
||||
|
||||
// check parent body name
|
||||
if (std::string(mjs_getString(body->name)).empty()) {
|
||||
if (mjs_getName(body->element)->empty()) {
|
||||
return comperr(error, "Parent body must have name", error_sz);
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ bool mjCFlexcomp::Make(mjsBody* body, char* error, int error_sz) {
|
||||
|
||||
flex->model = model;
|
||||
flex->id = id;
|
||||
mjs_setString(pf->name, name.c_str());
|
||||
mjs_setName(pf->element, name.c_str());
|
||||
mjs_setInt(pf->elem, element.data(), element.size());
|
||||
mjs_setFloat(pf->texcoord, texcoord.data(), texcoord.size());
|
||||
mjs_setInt(pf->elemtexcoord, elemtexcoord.data(), elemtexcoord.size());
|
||||
@@ -420,7 +420,7 @@ bool mjCFlexcomp::Make(mjsBody* body, char* error, int error_sz) {
|
||||
|
||||
// rigid: set parent name, nothing else to do
|
||||
if (rigid) {
|
||||
mjs_appendString(pf->vertbody, mjs_getString(body->name));
|
||||
mjs_appendString(pf->vertbody, mjs_getName(body->element)->c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ bool mjCFlexcomp::Make(mjsBody* body, char* error, int error_sz) {
|
||||
|
||||
// pinned or trilinear: parent body
|
||||
if (pinned[i] || doftype == mjFCOMPDOF_TRILINEAR) {
|
||||
mjs_appendString(pf->vertbody, mjs_getString(body->name));
|
||||
mjs_appendString(pf->vertbody, mjs_getName(body->element)->c_str());
|
||||
|
||||
// add plugin
|
||||
if (plugin.active) {
|
||||
@@ -507,8 +507,8 @@ bool mjCFlexcomp::Make(mjsBody* body, char* error, int error_sz) {
|
||||
// construct body name, add to vertbody
|
||||
char txt[100];
|
||||
mju::sprintf_arr(txt, "%s_%d", name.c_str(), i);
|
||||
mjs_setString(pb->name, txt);
|
||||
mjs_appendString(pf->vertbody, mjs_getString(pb->name));
|
||||
mjs_setName(pb->element, txt);
|
||||
mjs_appendString(pf->vertbody, mjs_getName(pb->element)->c_str());
|
||||
|
||||
// clear flex vertex coordinates if allocated
|
||||
if (!centered) {
|
||||
@@ -538,7 +538,7 @@ bool mjCFlexcomp::Make(mjsBody* body, char* error, int error_sz) {
|
||||
node[3*(i*4+j*2+k)+0] = i == 0 ? minmax[0] : minmax[3];
|
||||
node[3*(i*4+j*2+k)+1] = j == 0 ? minmax[1] : minmax[4];
|
||||
node[3*(i*4+j*2+k)+2] = k == 0 ? minmax[2] : minmax[5];
|
||||
mjs_appendString(pf->nodebody, mjs_getString(body->name));
|
||||
mjs_appendString(pf->nodebody, mjs_getName(body->element)->c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -571,8 +571,8 @@ bool mjCFlexcomp::Make(mjsBody* body, char* error, int error_sz) {
|
||||
// construct node name, add to nodebody
|
||||
char txt[100];
|
||||
mju::sprintf_arr(txt, "%s_%d_%d_%d", name.c_str(), i, j, k);
|
||||
mjs_setString(pb->name, txt);
|
||||
mjs_appendString(pf->nodebody, mjs_getString(pb->name));
|
||||
mjs_setName(pb->element, txt);
|
||||
mjs_appendString(pf->nodebody, mjs_getName(pb->element)->c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,6 @@ mjCMesh& mjCMesh::operator=(const mjCMesh& other) {
|
||||
|
||||
void mjCMesh::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.file = &spec_file_;
|
||||
spec.content_type = &spec_content_type_;
|
||||
spec.uservert = &spec_vert_;
|
||||
@@ -2428,7 +2427,6 @@ mjCSkin& mjCSkin::operator=(const mjCSkin& other) {
|
||||
|
||||
void mjCSkin::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.file = &spec_file_;
|
||||
spec.material = &spec_material_;
|
||||
spec.vert = &spec_vert_;
|
||||
@@ -3327,7 +3325,6 @@ mjCFlex& mjCFlex::operator=(const mjCFlex& other) {
|
||||
|
||||
void mjCFlex::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.material = &spec_material_;
|
||||
spec.vertbody = &spec_vertbody_;
|
||||
spec.nodebody = &spec_nodebody_;
|
||||
|
||||
@@ -747,6 +747,7 @@ void mjCDef::NameSpace(const mjCModel* m) {
|
||||
|
||||
void mjCDef::CopyWithoutChildren(const mjCDef& other) {
|
||||
name = other.name;
|
||||
elemtype = other.elemtype;
|
||||
parent = nullptr;
|
||||
child.clear();
|
||||
joint_ = other.joint_;
|
||||
@@ -780,7 +781,6 @@ void mjCDef::PointToLocal() {
|
||||
tendon_.PointToLocal();
|
||||
actuator_.PointToLocal();
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.joint = &joint_.spec;
|
||||
spec.geom = &geom_.spec;
|
||||
spec.site = &site_.spec;
|
||||
@@ -1261,7 +1261,6 @@ void mjCBody::ResetId() {
|
||||
|
||||
void mjCBody::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.childclass = &classname;
|
||||
spec.userdata = &spec_userdata_;
|
||||
spec.plugin.plugin_name = &plugin_name;
|
||||
@@ -2310,7 +2309,6 @@ bool mjCFrame::IsAncestor(const mjCFrame* child) const {
|
||||
|
||||
void mjCFrame::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.childclass = &classname;
|
||||
spec.info = &info;
|
||||
}
|
||||
@@ -2461,7 +2459,6 @@ mjtNum* mjCJoint::qvel(const std::string& state_name) {
|
||||
|
||||
void mjCJoint::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.userdata = &spec_userdata_;
|
||||
spec.info = &info;
|
||||
userdata = nullptr;
|
||||
@@ -2659,7 +2656,6 @@ mjCGeom& mjCGeom::operator=(const mjCGeom& other) {
|
||||
// to be called after any default copy constructor
|
||||
void mjCGeom::PointToLocal(void) {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.info = &info;
|
||||
spec.userdata = &spec_userdata_;
|
||||
spec.material = &spec_material_;
|
||||
@@ -3481,7 +3477,6 @@ mjCSite& mjCSite::operator=(const mjCSite& other) {
|
||||
|
||||
void mjCSite::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.info = &info;
|
||||
spec.material = &spec_material_;
|
||||
spec.userdata = &spec_userdata_;
|
||||
@@ -3642,7 +3637,6 @@ mjCCamera& mjCCamera::operator=(const mjCCamera& other) {
|
||||
|
||||
void mjCCamera::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.userdata = &spec_userdata_;
|
||||
spec.targetbody = &spec_targetbody_;
|
||||
spec.info = &info;
|
||||
@@ -3800,7 +3794,6 @@ mjCLight& mjCLight::operator=(const mjCLight& other) {
|
||||
|
||||
void mjCLight::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.targetbody = &spec_targetbody_;
|
||||
spec.texture = &spec_texture_;
|
||||
spec.info = &info;
|
||||
@@ -3920,7 +3913,6 @@ mjCHField& mjCHField::operator=(const mjCHField& other) {
|
||||
|
||||
void mjCHField::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.file = &spec_file_;
|
||||
spec.content_type = &spec_content_type_;
|
||||
spec.userdata = &spec_userdata_;
|
||||
@@ -4185,7 +4177,6 @@ mjCTexture& mjCTexture::operator=(const mjCTexture& other) {
|
||||
|
||||
void mjCTexture::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.file = &spec_file_;
|
||||
spec.data = &data_;
|
||||
spec.content_type = &spec_content_type_;
|
||||
@@ -5054,7 +5045,6 @@ mjCMaterial& mjCMaterial::operator=(const mjCMaterial& other) {
|
||||
|
||||
void mjCMaterial::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.textures = &spec_textures_;
|
||||
spec.info = &info;
|
||||
textures = nullptr;
|
||||
@@ -5144,7 +5134,6 @@ mjCPair& mjCPair::operator=(const mjCPair& other) {
|
||||
|
||||
void mjCPair::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.geomname1 = &spec_geomname1_;
|
||||
spec.geomname2 = &spec_geomname2_;
|
||||
geomname1 = nullptr;
|
||||
@@ -5367,7 +5356,6 @@ mjCBodyPair& mjCBodyPair::operator=(const mjCBodyPair& other) {
|
||||
|
||||
void mjCBodyPair::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.bodyname1 = &spec_bodyname1_;
|
||||
spec.bodyname2 = &spec_bodyname2_;
|
||||
spec.info = &info;
|
||||
@@ -5502,7 +5490,6 @@ mjCEquality& mjCEquality::operator=(const mjCEquality& other) {
|
||||
|
||||
void mjCEquality::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.name1 = &spec_name1_;
|
||||
spec.name2 = &spec_name2_;
|
||||
spec.info = &info;
|
||||
@@ -5679,7 +5666,6 @@ bool mjCTendon::is_actfrclimited() const {
|
||||
|
||||
void mjCTendon::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.material = &spec_material_;
|
||||
spec.userdata = &spec_userdata_;
|
||||
spec.info = &info;
|
||||
@@ -6225,7 +6211,6 @@ mjtNum& mjCActuator::ctrl(const std::string& state_name) {
|
||||
|
||||
void mjCActuator::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.userdata = &spec_userdata_;
|
||||
spec.target = &spec_target_;
|
||||
spec.refsite = &spec_refsite_;
|
||||
@@ -6563,7 +6548,6 @@ mjCSensor& mjCSensor::operator=(const mjCSensor& other) {
|
||||
|
||||
void mjCSensor::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.userdata = &spec_userdata_;
|
||||
spec.objname = &spec_objname_;
|
||||
spec.refname = &spec_refname_;
|
||||
@@ -7103,7 +7087,6 @@ mjCNumeric& mjCNumeric::operator=(const mjCNumeric& other) {
|
||||
|
||||
void mjCNumeric::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.data = &spec_data_;
|
||||
spec.info = &info;
|
||||
data = nullptr;
|
||||
@@ -7193,7 +7176,6 @@ mjCText& mjCText::operator=(const mjCText& other) {
|
||||
|
||||
void mjCText::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.data = &spec_data_;
|
||||
spec.info = &info;
|
||||
data = nullptr;
|
||||
@@ -7274,7 +7256,6 @@ mjCTuple& mjCTuple::operator=(const mjCTuple& other) {
|
||||
|
||||
void mjCTuple::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.objtype = (mjIntVec*)&spec_objtype_;
|
||||
spec.objname = &spec_objname_;
|
||||
spec.objprm = &spec_objprm_;
|
||||
@@ -7410,7 +7391,6 @@ mjCKey& mjCKey::operator=(const mjCKey& other) {
|
||||
|
||||
void mjCKey::PointToLocal() {
|
||||
spec.element = static_cast<mjsElement*>(this);
|
||||
spec.name = &name;
|
||||
spec.qpos = &spec_qpos_;
|
||||
spec.qvel = &spec_qvel_;
|
||||
spec.act = &spec_act_;
|
||||
@@ -7556,7 +7536,6 @@ mjCPlugin::mjCPlugin(mjCModel* _model) {
|
||||
mjs_defaultPlugin(&spec);
|
||||
elemtype = mjOBJ_PLUGIN;
|
||||
spec.plugin_name = &plugin_name;
|
||||
spec.name = &name;
|
||||
spec.info = &info;
|
||||
|
||||
PointToLocal();
|
||||
|
||||
@@ -465,7 +465,6 @@ class mjCBody : public mjCBody_, private mjsBody {
|
||||
mjsBody spec;
|
||||
|
||||
// inherited
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
// used by mjXWriter and mjCModel
|
||||
@@ -564,7 +563,6 @@ class mjCFrame : public mjCFrame_, private mjsFrame {
|
||||
mjCFrame& operator=(const mjCFrame& other);
|
||||
|
||||
mjsFrame spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void CopyFromSpec(void);
|
||||
@@ -617,7 +615,6 @@ class mjCJoint : public mjCJoint_, private mjsJoint {
|
||||
mjCJoint& operator=(const mjCJoint& other);
|
||||
|
||||
mjsJoint spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void CopyFromSpec(void);
|
||||
@@ -696,7 +693,6 @@ class mjCGeom : public mjCGeom_, private mjsGeom {
|
||||
mjCGeom(const mjCGeom& other);
|
||||
mjCGeom& operator=(const mjCGeom& other);
|
||||
|
||||
using mjCBase::name;
|
||||
mjsGeom spec; // variables set by user
|
||||
double GetVolume() const; // compute geom volume
|
||||
void SetInertia(void); // compute and set geom inertia
|
||||
@@ -769,7 +765,6 @@ class mjCSite : public mjCSite_, private mjsSite {
|
||||
mjCBody* GetParent() const { return body; }
|
||||
|
||||
// use strings from mjCBase rather than mjStrings from mjsSite
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
// used by mjXWriter and mjCModel
|
||||
@@ -812,7 +807,6 @@ class mjCCamera : public mjCCamera_, private mjsCamera {
|
||||
mjCCamera& operator=(const mjCCamera& other);
|
||||
|
||||
mjsCamera spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
// used by mjXWriter and mjCModel
|
||||
@@ -858,7 +852,6 @@ class mjCLight : public mjCLight_, private mjsLight {
|
||||
mjCLight& operator=(const mjCLight& other);
|
||||
|
||||
mjsLight spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
// used by mjXWriter and mjCModel
|
||||
@@ -943,7 +936,6 @@ class mjCFlex: public mjCFlex_, private mjsFlex {
|
||||
mjCFlex& operator=(const mjCFlex& other);
|
||||
|
||||
mjsFlex spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void CopyFromSpec(void);
|
||||
@@ -1049,7 +1041,6 @@ class mjCMesh: public mjCMesh_, private mjsMesh {
|
||||
~mjCMesh();
|
||||
|
||||
mjsMesh spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void CopyFromSpec(void);
|
||||
@@ -1255,7 +1246,6 @@ class mjCSkin: public mjCSkin_, private mjsSkin {
|
||||
~mjCSkin();
|
||||
|
||||
mjsSkin spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
const std::string& File() const { return file_; }
|
||||
@@ -1313,7 +1303,6 @@ class mjCHField : public mjCHField_, private mjsHField {
|
||||
~mjCHField();
|
||||
|
||||
mjsHField spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void CopyFromSpec(void);
|
||||
@@ -1365,7 +1354,6 @@ class mjCTexture : public mjCTexture_, private mjsTexture {
|
||||
~mjCTexture();
|
||||
|
||||
mjsTexture spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void CopyFromSpec(void);
|
||||
@@ -1425,7 +1413,6 @@ class mjCMaterial : public mjCMaterial_, private mjsMaterial {
|
||||
mjCMaterial& operator=(const mjCMaterial& other);
|
||||
|
||||
mjsMaterial spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void CopyFromSpec();
|
||||
@@ -1465,7 +1452,6 @@ class mjCPair : public mjCPair_, private mjsPair {
|
||||
mjCPair& operator=(const mjCPair& other);
|
||||
|
||||
mjsPair spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void CopyFromSpec();
|
||||
@@ -1514,7 +1500,6 @@ class mjCBodyPair : public mjCBodyPair_, private mjsExclude {
|
||||
mjCBodyPair& operator=(const mjCBodyPair& other);
|
||||
|
||||
mjsExclude spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void CopyFromSpec();
|
||||
@@ -1560,7 +1545,6 @@ class mjCEquality : public mjCEquality_, private mjsEquality {
|
||||
mjCEquality& operator=(const mjCEquality& other);
|
||||
|
||||
mjsEquality spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void CopyFromSpec();
|
||||
@@ -1600,7 +1584,6 @@ class mjCTendon : public mjCTendon_, private mjsTendon {
|
||||
~mjCTendon();
|
||||
|
||||
mjsTendon spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void set_material(std::string _material) { material_ = _material; }
|
||||
@@ -1743,7 +1726,6 @@ class mjCActuator : public mjCActuator_, private mjsActuator {
|
||||
mjCActuator& operator=(const mjCActuator& other);
|
||||
|
||||
mjsActuator spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
// used by mjXWriter and mjCModel
|
||||
@@ -1804,7 +1786,6 @@ class mjCSensor : public mjCSensor_, private mjsSensor {
|
||||
mjCSensor& operator=(const mjCSensor& other);
|
||||
|
||||
mjsSensor spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
// used by mjXWriter and mjCModel
|
||||
@@ -1846,7 +1827,6 @@ class mjCNumeric : public mjCNumeric_, private mjsNumeric {
|
||||
~mjCNumeric();
|
||||
|
||||
mjsNumeric spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void PointToLocal();
|
||||
@@ -1878,7 +1858,6 @@ class mjCText : public mjCText_, private mjsText {
|
||||
~mjCText();
|
||||
|
||||
mjsText spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void PointToLocal();
|
||||
@@ -1915,7 +1894,6 @@ class mjCTuple : public mjCTuple_, private mjsTuple {
|
||||
~mjCTuple();
|
||||
|
||||
mjsTuple spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void PointToLocal();
|
||||
@@ -1959,7 +1937,6 @@ class mjCKey : public mjCKey_, private mjsKey {
|
||||
~mjCKey();
|
||||
|
||||
mjsKey spec;
|
||||
using mjCBase::name;
|
||||
using mjCBase::info;
|
||||
|
||||
void PointToLocal();
|
||||
|
||||
Reference in New Issue
Block a user