bfs_orient.h 988 B

12345678910111213141516171819202122232425262728293031
  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_BFS_ORIENT_H
  9. #define IGL_BFS_ORIENT_H
  10. #include <Eigen/Core>
  11. #include "igl_inline.h"
  12. namespace igl
  13. {
  14. /// Consistently orient faces in orientable patches using BFS.
  15. ///
  16. /// @param[in] F #F by 3 list of faces
  17. /// @param[out] FF #F by 3 list of faces (OK if same as F)
  18. /// @param[out] C #F list of component ids
  19. ///
  20. template <typename DerivedF, typename DerivedFF, typename DerivedC>
  21. IGL_INLINE void bfs_orient(
  22. const Eigen::MatrixBase<DerivedF> & F,
  23. Eigen::PlainObjectBase<DerivedFF> & FF,
  24. Eigen::PlainObjectBase<DerivedC> & C);
  25. }
  26. #ifndef IGL_STATIC_LIBRARY
  27. # include "bfs_orient.cpp"
  28. #endif
  29. #endif