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

Method getMaterialByName

Source/Falcor/Scene/Material/MaterialSystem.cpp:339–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337 }
338
339 ref<Material> MaterialSystem::getMaterialByName(const std::string& name) const
340 {
341 for (const auto& pMaterial : mMaterials)
342 {
343 if (pMaterial->getName() == name) return pMaterial;
344 }
345 return nullptr;
346 }
347
348 size_t MaterialSystem::removeDuplicateMaterials(std::vector<MaterialID>& idMap)
349 {

Callers 2

getMaterialFunction · 0.80
getMaterialByNameFunction · 0.80

Calls 1

getNameMethod · 0.45

Tested by

no test coverage detected