| 31 | |
| 32 | public: |
| 33 | AABBTree2(const Matrix2Fr& points, const Matrix2Ir& segments) { |
| 34 | const size_t num_segments = segments.rows(); |
| 35 | for (size_t i=0; i<num_segments; i++) { |
| 36 | const Vector2I& s = segments.row(i); |
| 37 | m_segments.emplace_back( |
| 38 | to_cgal_point(points.row(s[0])), |
| 39 | to_cgal_point(points.row(s[1]))); |
| 40 | } |
| 41 | |
| 42 | m_tree = std::make_shared<Tree>(m_segments.begin(), m_segments.end()); |
| 43 | m_tree->accelerate_distance_queries(); |
| 44 | } |
| 45 | |
| 46 | public: |
| 47 | /** |
no test coverage detected