limit_faces.h 963 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef IGL_LIMIT_FACES_H
  2. #define IGL_LIMIT_FACES_H
  3. #include "igl_inline.h"
  4. namespace igl
  5. {
  6. // LIMIT_FACES limit given faces F to those which contain (only) indices found
  7. // in L.
  8. //
  9. // [LF] = limit_faces(F,L,exclusive);
  10. // [LF,in] = limit_faces(F,L,exclusive);
  11. //
  12. // Templates:
  13. // MatF matrix type of faces, matrixXi
  14. // VecL matrix type of vertex indices, VectorXi
  15. // Inputs:
  16. // F #F by 3 list of face indices
  17. // L #L by 1 list of allowed indices
  18. // exclusive flag specifying whether a face is included only if all its
  19. // indices are in L, default is false
  20. // Outputs:
  21. // LF #LF by 3 list of remaining faces after limiting
  22. // in #F list of whether given face was included
  23. //
  24. template <typename MatF, typename VecL>
  25. IGL_INLINE void limit_faces(
  26. const MatF & F,
  27. const VecL & L,
  28. const bool exclusive,
  29. MatF & LF);
  30. }
  31. #ifdef IGL_HEADER_ONLY
  32. # include "limit_faces.cpp"
  33. #endif
  34. #endif