extract_non_manifold_edge_curves.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2016 Alec Jacobson <[email protected]>
  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. /// @param[in] F #F by 3 list representing triangles.
  24. /// @param[in] EMAP #F*3 list of indices of unique undirected edges.
  25. /// @param[in] uE2E #uE list of lists of indices into E of coexisting edges.
  26. /// @param[out] curves An array of arrays of unique edge indices.
  27. template<
  28. typename DerivedF,
  29. typename DerivedEMAP,
  30. typename uE2EType>
  31. IGL_INLINE void extract_non_manifold_edge_curves(
  32. const Eigen::MatrixBase<DerivedF>& F,
  33. const Eigen::MatrixBase<DerivedEMAP>& EMAP,
  34. const std::vector<std::vector<uE2EType> >& uE2E,
  35. std::vector<std::vector<size_t> >& curves);
  36. }
  37. #ifndef IGL_STATIC_LIBRARY
  38. # include "extract_non_manifold_edge_curves.cpp"
  39. #endif
  40. #endif