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

Method GetCartesianPoint3D

src/cpp/web-ifc/geometry/IfcGeometryLoader.cpp:1548–1564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1546 }
1547
1548 glm::dvec3 IfcGeometryLoader::GetCartesianPoint3D(const uint32_t expressID) const
1549 {
1550 spdlog::debug("[GetCartesianPoint3D({})]", expressID);
1551 if (auto it = _cache.GetCartesianPoint3DCache().find(expressID); it != _cache.GetCartesianPoint3DCache().end())
1552 {
1553 return it->second;
1554 }
1555 _loader.MoveToArgumentOffset(expressID, 0);
1556 _loader.GetTokenType();
1557 // because these calls cannot be reordered we have to use intermediate variables
1558 double x = _loader.GetDoubleArgument();
1559 double y = _loader.GetDoubleArgument();
1560 double z = _loader.GetOptionalDoubleParam(0);
1561 glm::dvec3 point(x, y, z);
1562 _cache.GetCartesianPoint3DCache().emplace(expressID, point);
1563 return point;
1564 }
1565
1566 glm::dvec2 IfcGeometryLoader::GetCartesianPoint2D(const uint32_t expressID) const
1567 {

Callers 2

GetMeshMethod · 0.80
GetSurfaceMethod · 0.80

Calls 5

debugFunction · 0.85
MoveToArgumentOffsetMethod · 0.80
GetTokenTypeMethod · 0.80
GetDoubleArgumentMethod · 0.80

Tested by

no test coverage detected