MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / correct_orientation

Method correct_orientation

tools/Triangle/TriangleWrapper.cpp:476–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476void 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

Callers

nothing calls this directly

Calls 1

compute_winding_numberFunction · 0.70

Tested by

no test coverage detected