| 395 | } |
| 396 | |
| 397 | void Cloth::saveMovableToFile(string path) { |
| 398 | string filepath = "cloth_movable.txt"; |
| 399 | |
| 400 | if (path == "") { |
| 401 | filepath = "cloth_movable.txt"; |
| 402 | } else { |
| 403 | filepath = path; |
| 404 | } |
| 405 | |
| 406 | string outputFileName = pdal::FileUtils::toAbsolutePath(filepath, path); |
| 407 | |
| 408 | ofstream f1(outputFileName.c_str()); |
| 409 | |
| 410 | if (!f1) |
| 411 | return; |
| 412 | |
| 413 | for (size_t i = 0; i < particles.size(); i++) { |
| 414 | if (particles[i].isMovable()) { |
| 415 | f1 << fixed << setprecision(8) << particles[i].getPos().f[0] << " " |
| 416 | << particles[i].getPos().f[2] << " "<< -particles[i].getPos().f[1] << endl; |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | f1.close(); |
| 421 | } |
nothing calls this directly
no test coverage detected