MCPcopy Create free account
hub / github.com/PDAL/PDAL / saveMovableToFile

Method saveMovableToFile

filters/private/csf/Cloth.cpp:397–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397void 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}

Callers

nothing calls this directly

Calls 4

toAbsolutePathFunction · 0.85
isMovableMethod · 0.80
sizeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected