| 755 | } |
| 756 | |
| 757 | ConversionResultShape* ifcopenshell::geometry::CgalShape::moved(ifcopenshell::geometry::taxonomy::matrix4::ptr place) const |
| 758 | { |
| 759 | cgal_shape_t s = *this; |
| 760 | |
| 761 | if (!place->is_identity()) { |
| 762 | const auto& m = place->ccomponents(); |
| 763 | |
| 764 | // @todo check |
| 765 | const cgal_placement_t trsf( |
| 766 | m(0, 0), m(0, 1), m(0, 2), m(0, 3), |
| 767 | m(1, 0), m(1, 1), m(1, 2), m(1, 3), |
| 768 | m(2, 0), m(2, 1), m(2, 2), m(2, 3)); |
| 769 | |
| 770 | // Apply transformation |
| 771 | for (auto &vertex : s.vertex_handles()) { |
| 772 | vertex->point() = vertex->point().transform(trsf); |
| 773 | } |
| 774 | } |
| 775 | |
| 776 | return new CgalShape(s, convex_tag_); |
| 777 | } |
| 778 | |
| 779 | void ifcopenshell::geometry::CgalShape::map(OpaqueCoordinate<4>&, OpaqueCoordinate<4>&) { |
| 780 | throw std::runtime_error("Not implemented"); |
no test coverage detected