ears.h 785 B

123456789101112131415161718192021222324252627282930
  1. #ifndef IGL_EARS_H
  2. #define IGL_EARS_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. namespace igl
  6. {
  7. // FIND_EARS Find all ears (faces with two boundary edges) in a given mesh
  8. //
  9. // [ears,ear_opp] = find_ears(F)
  10. //
  11. // Inputs:
  12. // F #F by 3 list of triangle mesh indices
  13. // Outputs:
  14. // ears #ears list of indices into F of ears
  15. // ear_opp #ears list of indices indicating which edge is non-boundary
  16. // (connecting to flops)
  17. //
  18. template <
  19. typename DerivedF,
  20. typename Derivedear,
  21. typename Derivedear_opp>
  22. IGL_INLINE void ears(
  23. const Eigen::MatrixBase<DerivedF> & F,
  24. Eigen::PlainObjectBase<Derivedear> & ear,
  25. Eigen::PlainObjectBase<Derivedear_opp> & ear_opp);
  26. }
  27. #ifndef IGL_STATIC_LIBRARY
  28. # include "ears.cpp"
  29. #endif
  30. #endif