boundary_faces.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef IGL_BOUNDARY_FACES_H
  2. #define IGL_BOUNDARY_FACES_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 (edges) of tetrahedra (triangles)
  11. // stored in T
  12. //
  13. // Templates:
  14. // IntegerT integer-value: e.g. int
  15. // IntegerF integer-value: e.g. int
  16. // Input:
  17. // T tetrahedron (triangle) index list, m by 4 (3), where m is the number of tetrahedra
  18. // Output:
  19. // F list of boundary faces, n by 3 (2), where n is the number of boundary faces
  20. //
  21. //
  22. template <typename IntegerT, typename IntegerF>
  23. IGL_INLINE void boundary_faces(
  24. const std::vector<std::vector<IntegerT> > & T,
  25. std::vector<std::vector<IntegerF> > & F);
  26. #ifndef IGL_NO_EIGEN
  27. // Templates:
  28. // DerivedT integer-value: i.e. from MatrixXi
  29. // DerivedF integer-value: i.e. from MatrixXi
  30. template <typename DerivedT, typename DerivedF>
  31. IGL_INLINE void boundary_faces(
  32. const Eigen::PlainObjectBase<DerivedT>& T,
  33. Eigen::PlainObjectBase<DerivedF>& F);
  34. // Same as above but returns F
  35. template <typename DerivedT, typename Ret>
  36. Ret boundary_faces(
  37. const Eigen::PlainObjectBase<DerivedT>& T);
  38. #endif
  39. }
  40. #ifdef IGL_HEADER_ONLY
  41. # include "boundary_faces.cpp"
  42. #endif
  43. #endif