orient_halfedges.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2020 Oded Stein <[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_ORIENT_HALFEDGES_H
  9. #define IGL_ORIENT_HALFEDGES_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. /// Orients halfedges for a triangle mesh, assigning them to a unique edge.
  15. ///
  16. /// @param[in] F #F by 3 input mesh connectivity
  17. /// @param[out] E #F by 3 a mapping from each halfedge to each edge
  18. /// @param[out] oE #F by 3 the orientation (e.g., -1 or 1) of each halfedge compared to
  19. /// the orientation of the actual edge. Every edge appears positively oriented
  20. /// exactly once.
  21. ///
  22. /// \see unique_simplices
  23. template <typename DerivedF, typename DerivedE, typename DerivedOE>
  24. IGL_INLINE void orient_halfedges(
  25. const Eigen::MatrixBase<DerivedF>& F,
  26. Eigen::PlainObjectBase<DerivedE>& E,
  27. Eigen::PlainObjectBase<DerivedOE>& oE);
  28. }
  29. #ifndef IGL_STATIC_LIBRARY
  30. # include "orient_halfedges.cpp"
  31. #endif
  32. #endif