MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / GetLightSource

Method GetLightSource

src/slg/lights/lightsourcedefs.cpp:70–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70const LightSource *LightSourceDefinitions::GetLightSource(const string &name) const {
71 // Check if the LightSource has been already defined
72 boost::unordered_map<std::string, LightSource *>::const_iterator it = lightsByName.find(name);
73
74 if (it == lightsByName.end())
75 throw runtime_error("Reference to an undefined LightSource in LightSourceDefinitions::GetLightSource(): " + name);
76 else
77 return it->second;
78}
79
80LightSource *LightSourceDefinitions::GetLightSource(const string &name) {
81 // Check if the LightSource has been already defined

Callers 5

ToPropertiesMethod · 0.45
BOOST_FOREACHFunction · 0.45
DirectHitFiniteLightMethod · 0.45
DirectHitLightMethod · 0.45

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected