manifold_patches.h 920 B

123456789101112131415161718192021222324252627282930
  1. #ifndef IGL_MANIFOLD_PATCHES_H
  2. #define IGL_MANIFOLD_PATCHES_H
  3. #include <igl/igl_inline.h>
  4. #include <Eigen/Core>
  5. #include <Eigen/Sparse>
  6. namespace igl
  7. {
  8. // Compute connected components of facets connected by manifold edges.
  9. //
  10. // Known bugs: This will detect a moebius strip as a single patch (manifold,
  11. // non-orientable) and also non-manfiold, yet orientable patches.
  12. //
  13. // Q: Does this find exactly (manifold || orientable) patches?
  14. //
  15. // Inputs:
  16. // F #F by simplex-size list of facets
  17. // Outputs:
  18. // C #F list of component ids
  19. // A #F by #F adjacency matrix
  20. //
  21. template <typename DerivedF, typename DerivedC, typename AScalar>
  22. IGL_INLINE void manifold_patches(
  23. const Eigen::PlainObjectBase<DerivedF> & F,
  24. Eigen::PlainObjectBase<DerivedC> & C,
  25. Eigen::SparseMatrix<AScalar> & A);
  26. };
  27. #ifdef IGL_HEADER_ONLY
  28. # include "manifold_patches.cpp"
  29. #endif
  30. #endif