| 456 | } |
| 457 | |
| 458 | bool TriangleWrapper::select_seed_point(const Region& region, VectorF& seed_p) { |
| 459 | const Float degeneracy_tol = std::min(m_max_area * 0.01, 1e-6); |
| 460 | bool seed_found = false; |
| 461 | for (auto face_idx : region) { |
| 462 | const VectorI& f = m_faces.row(face_idx); |
| 463 | const VectorF& v0 = m_vertices.row(f[0]); |
| 464 | const VectorF& v1 = m_vertices.row(f[1]); |
| 465 | const VectorF& v2 = m_vertices.row(f[2]); |
| 466 | Float area = compute_2D_triangle_area(v0, v1, v2); |
| 467 | if (area > degeneracy_tol) { |
| 468 | seed_found = true; |
| 469 | seed_p = (v0+v1+v2)/3.0; |
| 470 | break; |
| 471 | } |
| 472 | } |
| 473 | return seed_found; |
| 474 | } |
| 475 | |
| 476 | void TriangleWrapper::correct_orientation() { |
| 477 | const size_t num_faces = m_faces.rows(); |
nothing calls this directly
no test coverage detected