Remove the Shell plugin and integrate it into the engine.

PiperOrigin-RevId: 760688502
Change-Id: Ia70988d42b7edf571d7cb4a4f48f8fc50b51667d
This commit is contained in:
Alessio Quaglino
2025-05-19 10:50:27 -07:00
committed by Copybara-Service
parent 45fc15b844
commit 7edbdd0ad6
28 changed files with 90 additions and 291 deletions
+1
View File
@@ -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 ------------------------------------------------
+11 -2
View File
@@ -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
+1 -1
View File
@@ -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");