MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/MaterialX / getUnitAsInteger

Method getUnitAsInteger

source/MaterialXCore/Unit.cpp:144–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144int LinearUnitConverter::getUnitAsInteger(const string& unitName) const
145{
146 const auto it = _unitEnumeration.find(unitName);
147 if (it != _unitEnumeration.end())
148 {
149 return it->second;
150 }
151 return -1;
152}
153
154string LinearUnitConverter::getUnitFromInteger(int index) const
155{

Callers 6

initContextMethod · 0.80
Unit.cppFile · 0.80
loadStandardLibrariesMethod · 0.80
loadStandardLibrariesFunction · 0.80
DEFINE_SHADER_STAGEFunction · 0.80

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected