Allow height-field elevation data to be specified in XML.
PiperOrigin-RevId: 602374498 Change-Id: I2d3364d68876a35799b24aca1051e2f5aebdda75
This commit is contained in:
committed by
Copybara-Service
parent
e6847f843d
commit
e143b3dbc0
+4
-2
@@ -875,11 +875,13 @@ void mjXUtil::Vector2String(string& txt, const vector<double>& vec) {
|
||||
|
||||
|
||||
// write vector<float> to string
|
||||
void mjXUtil::Vector2String(string& txt, const vector<float>& vec) {
|
||||
void mjXUtil::Vector2String(string& txt, const vector<float>& vec, int ncol) {
|
||||
stringstream strm;
|
||||
|
||||
for (size_t i=0; i<vec.size(); i++) {
|
||||
if (i>0) {
|
||||
if (ncol && (i % ncol) == 0) {
|
||||
strm << "\n ";
|
||||
} else if (i>0) {
|
||||
strm << " ";
|
||||
}
|
||||
strm << vec[i];
|
||||
|
||||
Reference in New Issue
Block a user