| 403 | } |
| 404 | |
| 405 | void ifcopenshell::geometry::CgalShape::Serialize(const ifcopenshell::geometry::taxonomy::matrix4& place, std::string& r) const { |
| 406 | cgal_shape_t s = *this; |
| 407 | |
| 408 | if (!place.is_identity()) { |
| 409 | const auto& m = place.ccomponents(); |
| 410 | |
| 411 | // @todo check |
| 412 | const cgal_placement_t trsf( |
| 413 | m(0, 0), m(0, 1), m(0, 2), m(0, 3), |
| 414 | m(1, 0), m(1, 1), m(1, 2), m(1, 3), |
| 415 | m(2, 0), m(2, 1), m(2, 2), m(2, 3)); |
| 416 | |
| 417 | // Apply transformation |
| 418 | for (auto &vertex : s.vertex_handles()) { |
| 419 | vertex->point() = vertex->point().transform(trsf); |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | std::stringstream sstream; |
| 424 | sstream << s; |
| 425 | r = sstream.str(); |
| 426 | } |
| 427 | |
| 428 | #include <CGAL/Polygon_mesh_processing/bbox.h> |
| 429 |
no test coverage detected