| 405 | } |
| 406 | |
| 407 | bool SDFGrid::writePrimitivesToFile(const std::filesystem::path& path) |
| 408 | { |
| 409 | std::ofstream ofs(path); |
| 410 | if (!ofs.good()) |
| 411 | { |
| 412 | logWarning("Failed to open SDF grid file '{}' for writing.", path); |
| 413 | return false; |
| 414 | } |
| 415 | |
| 416 | json j = mPrimitives; |
| 417 | ofs << j.dump(4); |
| 418 | |
| 419 | ofs.close(); |
| 420 | |
| 421 | return true; |
| 422 | } |
| 423 | |
| 424 | const SDF3DPrimitive& SDFGrid::getPrimitive(uint32_t primitiveID) const |
| 425 | { |
no test coverage detected