extract_non_manifold_edge_curves.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef IGL_CGAL_EXTRACT_NON_MANIFOLD_EDGE_CURVES
  2. #define IGL_CGAL_EXTRACT_NON_MANIFOLD_EDGE_CURVES
  3. #include "igl_inline.h"
  4. #include <Eigen/Dense>
  5. #include <vector>
  6. namespace igl {
  7. // Extract non-manifold curves from a given mesh.
  8. // A non-manifold curves are a set of connected non-manifold edges that
  9. // does not touch other non-manifold edges except at the end points.
  10. // They are also maximal in the sense that they cannot be expanded by
  11. // including more edges.
  12. //
  13. // Assumes the input mesh have all self-intersection resolved. See
  14. // ``igl::cgal::remesh_self_intersection`` for more details.
  15. //
  16. // Inputs:
  17. // F #F by 3 list representing triangles.
  18. // EMAP #F*3 list of indices of unique undirected edges.
  19. // uE2E #uE list of lists of indices into E of coexisting edges.
  20. //
  21. // Output:
  22. // curves An array of arries of unique edge indices.
  23. template<
  24. typename DerivedF,
  25. typename DerivedEMAP,
  26. typename uE2EType>
  27. IGL_INLINE void extract_non_manifold_edge_curves(
  28. const Eigen::PlainObjectBase<DerivedF>& F,
  29. const Eigen::PlainObjectBase<DerivedEMAP>& EMAP,
  30. const std::vector<std::vector<uE2EType> >& uE2E,
  31. std::vector<std::vector<size_t> >& curves);
  32. }
  33. #ifndef IGL_STATIC_LIBRARY
  34. # include "extract_non_manifold_edge_curves.cpp"
  35. #endif
  36. #endif