| 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 | { |
no test coverage detected