MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / writePrimitivesToFile

Method writePrimitivesToFile

Source/Falcor/Scene/SDFs/SDFGrid.cpp:407–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

renderUIMethod · 0.80

Calls 3

logWarningFunction · 0.50
dumpMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected