MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / FindMaterialByName

Function FindMaterialByName

src/ifcmax/IfcMax.cpp:125–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123#endif
124
125static Mtl* FindMaterialByName(MtlBaseLib* library, const std::string& material_name) {
126 TSTR mat_name = S(material_name);
127 const int mat_index = library->FindMtlByName(mat_name);
128 Mtl* m = 0;
129 if (mat_index != -1) {
130 m = static_cast<Mtl*>((*library)[mat_index]);
131 }
132 return m;
133}
134
135static Mtl* FindOrCreateMaterial(MtlBaseLib* library, Interface* max_interface, int& slot, const IfcGeom::Material& material) {
136 Mtl* m = FindMaterialByName(library, material.name());

Callers 2

FindOrCreateMaterialFunction · 0.85
ComposeMultiMaterialFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected