| 474 | } |
| 475 | |
| 476 | void TriangleWrapper::correct_orientation() { |
| 477 | const size_t num_faces = m_faces.rows(); |
| 478 | if (num_faces == 0) return; |
| 479 | |
| 480 | Region region; |
| 481 | for (size_t i=0; i<num_faces; i++) region.push_back(i); |
| 482 | |
| 483 | VectorF seed_p; |
| 484 | bool seed_found = select_seed_point(region, seed_p); |
| 485 | if (!seed_found) return; |
| 486 | |
| 487 | Float wind_num = compute_winding_number(seed_p, m_points, m_segments); |
| 488 | if (wind_num < -0.5) { |
| 489 | m_faces.col(1).swap(m_faces.col(2)); |
| 490 | } |
| 491 | } |
| 492 | |
| 493 | #endif |
nothing calls this directly
no test coverage detected