limit_faces.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_LIMIT_FACES_H
  9. #define IGL_LIMIT_FACES_H
  10. #include "igl_inline.h"
  11. namespace igl
  12. {
  13. // LIMIT_FACES limit given faces F to those which contain (only) indices found
  14. // in L.
  15. //
  16. // [LF] = limit_faces(F,L,exclusive);
  17. // [LF,in] = limit_faces(F,L,exclusive);
  18. //
  19. // Templates:
  20. // MatF matrix type of faces, matrixXi
  21. // VecL matrix type of vertex indices, VectorXi
  22. // Inputs:
  23. // F #F by 3 list of face indices
  24. // L #L by 1 list of allowed indices
  25. // exclusive flag specifying whether a face is included only if all its
  26. // indices are in L, default is false
  27. // Outputs:
  28. // LF #LF by 3 list of remaining faces after limiting
  29. // in #F list of whether given face was included
  30. //
  31. template <typename MatF, typename VecL>
  32. IGL_INLINE void limit_faces(
  33. const MatF & F,
  34. const VecL & L,
  35. const bool exclusive,
  36. MatF & LF);
  37. }
  38. #ifndef IGL_STATIC_LIBRARY
  39. # include "limit_faces.cpp"
  40. #endif
  41. #endif