on_boundary.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_ON_BOUNDARY_H
  9. #define IGL_ON_BOUNDARY_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. #include <vector>
  13. namespace igl
  14. {
  15. /// Determine boundary facets of mesh elements stored in T
  16. ///
  17. /// @tparam IntegerT integer-value: i.e. int
  18. /// @tparam IntegerF integer-value: i.e. int
  19. /// @param[in] T triangle|tetrahedron index list, m by 3|4, where m is the
  20. /// number of elements
  21. /// @param[out] I m long list of bools whether tet is on boundary
  22. /// @param[out] C m by 3|4 list of bools whether opposite facet is on
  23. /// boundary
  24. ///
  25. template <typename IntegerT>
  26. IGL_INLINE void on_boundary(
  27. const std::vector<std::vector<IntegerT> > & T,
  28. std::vector<bool> & I,
  29. std::vector<std::vector<bool> > & C);
  30. /// \overload
  31. template <typename DerivedT, typename DerivedI, typename DerivedC>
  32. IGL_INLINE void on_boundary(
  33. const Eigen::MatrixBase<DerivedT>& T,
  34. Eigen::PlainObjectBase<DerivedI>& I,
  35. Eigen::PlainObjectBase<DerivedC>& C);
  36. }
  37. #ifndef IGL_STATIC_LIBRARY
  38. # include "on_boundary.cpp"
  39. #endif
  40. #endif