| 59 | } |
| 60 | |
| 61 | std::vector<Box> get_triangle_bboxes( |
| 62 | const SelfIntersection::Points& pts, const MatrixIr& faces) { |
| 63 | const size_t num_faces = faces.rows(); |
| 64 | std::vector<Box> boxes; |
| 65 | boxes.reserve(num_faces); |
| 66 | for (size_t i=0; i<num_faces; i++) { |
| 67 | const Vector3I f = faces.row(i); |
| 68 | const std::vector<SelfIntersection::Point_3> corners{ |
| 69 | pts[f[0]], pts[f[1]], pts[f[2]] |
| 70 | }; |
| 71 | if (CGAL::collinear(pts[f[0]], pts[f[1]], pts[f[2]])) { |
| 72 | // Triangle is degenerated. |
| 73 | continue; |
| 74 | } |
| 75 | boxes.emplace_back(CGAL::bbox_3(corners.begin(), corners.end())); |
| 76 | boxes.back().set_id(i); |
| 77 | } |
| 78 | return boxes; |
| 79 | } |
| 80 | } |
| 81 | using namespace SelfIntersectionHelper; |
| 82 |
no test coverage detected