limit_faces.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <[email protected]>
  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 given faces F to those which contain (only) indices found
  14. /// in L.
  15. ///
  16. /// @tparam MatF matrix type of faces, Eigen::MatrixXi
  17. /// @tparam VecL matrix type of vertex indices, Eigen::VectorXi
  18. /// @param[in] F #F by 3 list of face indices
  19. /// @param[in] L #L by 1 list of allowed indices
  20. /// @param[in] exclusive flag specifying whether a face is included only if all its
  21. /// indices are in L, default is false
  22. /// @param[out] LF #LF by 3 list of remaining faces after limiting
  23. template <typename MatF, typename VecL>
  24. IGL_INLINE void limit_faces(
  25. const MatF & F,
  26. const VecL & L,
  27. const bool exclusive,
  28. MatF & LF);
  29. }
  30. #ifndef IGL_STATIC_LIBRARY
  31. # include "limit_faces.cpp"
  32. #endif
  33. #endif