Remove the Shell plugin and integrate it into the engine.
PiperOrigin-RevId: 760688502 Change-Id: Ia70988d42b7edf571d7cb4a4f48f8fc50b51667d
This commit is contained in:
committed by
Copybara-Service
parent
45fc15b844
commit
7edbdd0ad6
@@ -71,6 +71,7 @@ extern const mjMap datatype_map[];
|
||||
extern const mjMap meshtype_map[];
|
||||
extern const mjMap meshinertia_map[];
|
||||
extern const mjMap flexself_map[];
|
||||
extern const mjMap elastic2d_map[];
|
||||
|
||||
|
||||
//---------------------------------- Base XML class ------------------------------------------------
|
||||
|
||||
@@ -807,6 +807,15 @@ const mjMap flexself_map[5] = {
|
||||
};
|
||||
|
||||
|
||||
// flex elastic 2d type
|
||||
const mjMap elastic2d_map[5] = {
|
||||
{"none", 0},
|
||||
{"bend", 1},
|
||||
{"stretch", 2},
|
||||
{"both", 3},
|
||||
};
|
||||
|
||||
|
||||
|
||||
//---------------------------------- class mjXReader implementation --------------------------------
|
||||
|
||||
@@ -1401,7 +1410,7 @@ void mjXReader::OneFlex(XMLElement* elem, mjsFlex* flex) {
|
||||
ReadAttr(elasticity, "poisson", 1, &flex->poisson, text);
|
||||
ReadAttr(elasticity, "thickness", 1, &flex->thickness, text);
|
||||
ReadAttr(elasticity, "damping", 1, &flex->damping, text);
|
||||
ReadAttr(elasticity, "elastic2d", 1, &flex->elastic2d, text);
|
||||
MapValue(elasticity, "elastic2d", &flex->elastic2d, elastic2d_map, 4);
|
||||
}
|
||||
|
||||
// write error info
|
||||
@@ -2665,7 +2674,7 @@ void mjXReader::OneFlexcomp(XMLElement* elem, mjsBody* body, const mjVFS* vfs) {
|
||||
ReadAttr(elasticity, "poisson", 1, &dflex.poisson, text);
|
||||
ReadAttr(elasticity, "damping", 1, &dflex.damping, text);
|
||||
ReadAttr(elasticity, "thickness", 1, &dflex.thickness, text);
|
||||
ReadAttr(elasticity, "elastic2d", 1, &dflex.elastic2d, text);
|
||||
MapValue(elasticity, "elastic2d", &dflex.elastic2d, elastic2d_map, 4);
|
||||
}
|
||||
|
||||
// check errors
|
||||
|
||||
@@ -194,7 +194,7 @@ void mjXWriter::OneFlex(XMLElement* elem, const mjCFlex* flex) {
|
||||
WriteAttr(elastic, "poisson", 1, &flex->poisson, &defflex.poisson);
|
||||
WriteAttr(elastic, "thickness", 1, &flex->thickness, &defflex.thickness);
|
||||
WriteAttr(elastic, "damping", 1, &flex->damping, &defflex.damping);
|
||||
WriteAttr(elastic, "elastic2d", 1, &flex->elastic2d, &defflex.elastic2d);
|
||||
WriteAttrKey(elastic, "elastic2d", elastic2d_map, 2, flex->elastic2d, defflex.elastic2d);
|
||||
|
||||
// edge subelement
|
||||
XMLElement* edge = InsertEnd(elem, "edge");
|
||||
|
||||
Reference in New Issue
Block a user