Move elasticity computation to mjCFlex.
PiperOrigin-RevId: 675949380 Change-Id: Ia48f4fd6ae1ede206ccacd1205914e7e4b3c7aec
This commit is contained in:
committed by
Copybara-Service
parent
0657e3e871
commit
ddbc083810
@@ -180,6 +180,13 @@ void mjXWriter::OneFlex(XMLElement* elem, const mjCFlex* flex) {
|
||||
elem->DeleteChild(cont);
|
||||
}
|
||||
|
||||
// elasticity subelement
|
||||
XMLElement* elastic = InsertEnd(elem, "elasticity");
|
||||
WriteAttr(elastic, "young", 1, &flex->young, &defflex.young);
|
||||
WriteAttr(elastic, "poisson", 1, &flex->poisson, &defflex.poisson);
|
||||
WriteAttr(elastic, "thickness", 1, &flex->thickness, &defflex.thickness);
|
||||
WriteAttr(elastic, "damping", 1, &flex->damping, &defflex.damping);
|
||||
|
||||
// edge subelement
|
||||
XMLElement* edge = InsertEnd(elem, "edge");
|
||||
WriteAttr(edge, "stiffness", 1, &flex->edgestiffness, &defflex.edgestiffness);
|
||||
|
||||
Reference in New Issue
Block a user