on_boundary.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef IGL_ON_BOUNDARY_H
  2. #define IGL_ON_BOUNDARY_H
  3. #include "igl_inline.h"
  4. #ifndef IGL_NO_EIGEN
  5. # include <Eigen/Dense>
  6. #endif
  7. #include <vector>
  8. namespace igl
  9. {
  10. // BOUNDARY_FACES Determine boundary faces of tetrahedra stored in T
  11. //
  12. // Templates:
  13. // IntegerT integer-value: i.e. int
  14. // IntegerF integer-value: i.e. int
  15. // Input:
  16. // T tetrahedron index list, m by 4, where m is the number of tetrahedra
  17. // Output:
  18. // I m long list of bools whether tet is on boundary
  19. // C m by 4 list of bools whether opposite face is on boundary
  20. //
  21. template <typename IntegerT>
  22. IGL_INLINE void on_boundary(
  23. const std::vector<std::vector<IntegerT> > & T,
  24. std::vector<bool> & I,
  25. std::vector<std::vector<bool> > & C);
  26. #ifndef IGL_NO_EIGEN
  27. // Templates:
  28. // DerivedT integer-value: i.e. from MatrixXi
  29. // DerivedI bool-value: i.e. from MatrixXi
  30. // DerivedC bool-value: i.e. from MatrixXi
  31. template <typename DerivedT, typename DerivedI, typename DerivedC>
  32. IGL_INLINE void on_boundary(
  33. const Eigen::PlainObjectBase<DerivedT>& T,
  34. Eigen::PlainObjectBase<DerivedI>& I,
  35. Eigen::PlainObjectBase<DerivedC>& C);
  36. #endif
  37. }
  38. #ifdef IGL_HEADER_ONLY
  39. # include "on_boundary.cpp"
  40. #endif
  41. #endif