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

Method GetFlatMesh

src/cpp/web-ifc/geometry/IfcGeometryProcessor.cpp:1674–1693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1672 }
1673
1674 IfcFlatMesh IfcGeometryProcessor::GetFlatMesh(uint32_t expressID, bool applyLinearScalingFactor)
1675 {
1676 spdlog::debug("[GetFlatMesh({})]", expressID);
1677 IfcFlatMesh flatMesh;
1678 flatMesh.expressID = expressID;
1679
1680 IfcComposedMesh composedMesh = GetMesh(expressID);
1681
1682 glm::dmat4 mat = glm::dmat4(1);
1683 if (applyLinearScalingFactor)
1684 {
1685 mat = glm::scale(glm::dvec3(_cache.GetLinearScalingFactor()));
1686 }
1687
1688 glm::dvec4 color = glm::dvec4(1, 1, 1, 1);
1689 bool hasColor = false;
1690 AddComposedMeshToFlatMesh(flatMesh, composedMesh, _transformation * NormalizeIFC * mat, color, hasColor);
1691
1692 return flatMesh;
1693 }
1694
1695 /**
1696 * Extracts all the geometries and their associated colors and transformations from a composed mesh

Callers 5

GetFlatMeshFunction · 0.45
StreamMeshesFunction · 0.45
LoadAllGeometryFunction · 0.45
LoadAllTestFunction · 0.45
GetAllRebarsFunction · 0.45

Calls 2

debugFunction · 0.85

Tested by 2

LoadAllTestFunction · 0.36
GetAllRebarsFunction · 0.36