MCPcopy Create free account
hub / github.com/ThatOpen/engine_web-ifc / PopulateMaterialDefinitionsMap

Method PopulateMaterialDefinitionsMap

src/cpp/web-ifc/cache/IfcCache.cpp:160–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 }
159
160 std::unordered_map<uint32_t, std::vector<std::pair<uint32_t, uint32_t>>> IfcCache::PopulateMaterialDefinitionsMap()
161 {
162 std::unordered_map<uint32_t, std::vector<std::pair<uint32_t, uint32_t>>> resultVector;
163 auto matDefs = _loader.GetExpressIDsWithType(schema::IFCMATERIALDEFINITIONREPRESENTATION);
164
165 for (uint32_t styledItemID : matDefs)
166 {
167 _loader.MoveToArgumentOffset(styledItemID, 2);
168
169 auto representations = _loader.GetSetArgument();
170
171 _loader.MoveToArgumentOffset(styledItemID, 3);
172
173 uint32_t material = _loader.GetRefArgument();
174
175 for (auto &representation : representations)
176 {
177 uint32_t representationID = _loader.GetRefArgument(representation);
178 resultVector[material].emplace_back(styledItemID, representationID);
179 }
180 }
181 return resultVector;
182 }
183
184 void IfcCache::ReadLinearScalingFactor()
185 {

Callers

nothing calls this directly

Calls 4

GetExpressIDsWithTypeMethod · 0.80
MoveToArgumentOffsetMethod · 0.80
GetSetArgumentMethod · 0.80
GetRefArgumentMethod · 0.80

Tested by

no test coverage detected