MCPcopy Create free account
hub / github.com/RenderKit/embree / loadMaterialLibrary

Method loadMaterialLibrary

tutorials/common/scenegraph/corona_loader.cpp:184–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182 }
183
184 Ref<SceneGraph::Node> CoronaLoader::loadMaterialLibrary(const FileName& fileName)
185 {
186 Ref<XML> xml = parseXML(path+fileName,"/.-",false);
187 if (xml->name != "mtlLib")
188 THROW_RUNTIME_ERROR(xml->loc.str()+": invalid material library");
189
190 for (auto& child : xml->children)
191 {
192 if (child->name == "materialDefinition") {
193 loadMaterialDefinition(child);
194 }
195 else if (child->name == "mapDefinition")
196 loadMapDefinition(child);
197 }
198
199 return nullptr;
200 }
201
202 Ref<SceneGraph::Node> CoronaLoader::loadObject(const Ref<XML>& xml)
203 {

Callers

nothing calls this directly

Calls 2

parseXMLFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected