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

Method createFromFile

Source/Falcor/Scene/Volume/Grid.cpp:92–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 }
91
92 ref<Grid> Grid::createFromFile(ref<Device> pDevice, const std::filesystem::path& path, const std::string& gridname)
93 {
94 if (!std::filesystem::exists(path))
95 {
96 logWarning("Error when loading grid. Can't open grid file '{}'.", path);
97 return nullptr;
98 }
99
100 if (hasExtension(path, "nvdb"))
101 {
102 return createFromNanoVDBFile(pDevice, path, gridname);
103 }
104 else if (hasExtension(path, "vdb"))
105 {
106 return createFromOpenVDBFile(pDevice, path, gridname);
107 }
108 else
109 {
110 logWarning("Error when loading grid. Unsupported grid file '{}'.", path);
111 return nullptr;
112 }
113 }
114
115 void Grid::renderUI(Gui::Widgets& widget)
116 {

Callers

nothing calls this directly

Calls 2

hasExtensionFunction · 0.85
logWarningFunction · 0.50

Tested by

no test coverage detected