facet_components.h 955 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef FACET_COMPONENTS_H
  2. #define FACET_COMPONENTS_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. #include <vector>
  6. namespace igl
  7. {
  8. // Compute connected components of facets based on edge-edge adjacency.
  9. //
  10. // Inputs:
  11. // F #F by 3 list of triangle indices
  12. // Ouputs:
  13. // C #F list of connected component ids
  14. template <typename DerivedF, typename DerivedC>
  15. IGL_INLINE void facet_components(
  16. const Eigen::PlainObjectBase<DerivedF> & F,
  17. Eigen::PlainObjectBase<DerivedC> & C);
  18. // Inputs:
  19. // TT #TT by 3 list of list of adjacency triangles (see
  20. // triangle_triangle_adjacency.h)
  21. // Ouputs:
  22. // C #F list of connected component ids
  23. template <
  24. typename TTIndex,
  25. typename DerivedC>
  26. IGL_INLINE void facet_components(
  27. const std::vector<std::vector<std::vector<TTIndex > > > & TT,
  28. Eigen::PlainObjectBase<DerivedC> & C);
  29. }
  30. #ifndef IGL_STATIC_LIBRARY
  31. # include "facet_components.cpp"
  32. #endif
  33. #endif