Allow height-field elevation data to be specified in XML.

PiperOrigin-RevId: 602374498
Change-Id: I2d3364d68876a35799b24aca1051e2f5aebdda75
This commit is contained in:
Yuval Tassa
2024-01-29 06:58:30 -08:00
committed by Copybara-Service
parent e6847f843d
commit e143b3dbc0
16 changed files with 258 additions and 35 deletions
+5
View File
@@ -1449,6 +1449,11 @@ void mjXWriter::Asset(XMLElement* root) {
} else {
WriteAttrInt(elem, "nrow", phf->nrow);
WriteAttrInt(elem, "ncol", phf->ncol);
if (!phf->userdata().empty()) {
string text;
Vector2String(text, phf->userdata(), phf->ncol);
WriteAttrTxt(elem, "elevation", text);
}
}
}
}