extract_non_manifold_edge_curves.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2016 Alec Jacobson <alecjacobson@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_NON_MANIFOLD_EDGE_CURVES
  9. #define IGL_NON_MANIFOLD_EDGE_CURVES
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. #include <vector>
  13. namespace igl {
  14. // Extract non-manifold curves from a given mesh.
  15. // A non-manifold curves are a set of connected non-manifold edges that
  16. // does not touch other non-manifold edges except at the end points.
  17. // They are also maximal in the sense that they cannot be expanded by
  18. // including more edges.
  19. //
  20. // Assumes the input mesh have all self-intersection resolved. See
  21. // ``igl::cgal::remesh_self_intersection`` for more details.
  22. //
  23. // Inputs:
  24. // F #F by 3 list representing triangles.
  25. // EMAP #F*3 list of indices of unique undirected edges.
  26. // uE2E #uE list of lists of indices into E of coexisting edges.
  27. //
  28. // Output:
  29. // curves An array of arries of unique edge indices.
  30. template<
  31. typename DerivedF,
  32. typename DerivedEMAP,
  33. typename uE2EType>
  34. IGL_INLINE void extract_non_manifold_edge_curves(
  35. const Eigen::PlainObjectBase<DerivedF>& F,
  36. const Eigen::PlainObjectBase<DerivedEMAP>& EMAP,
  37. const std::vector<std::vector<uE2EType> >& uE2E,
  38. std::vector<std::vector<size_t> >& curves);
  39. }
  40. #ifndef IGL_STATIC_LIBRARY
  41. # include "extract_non_manifold_edge_curves.cpp"
  42. #endif
  43. #endif