flipped_triangles.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2016 Michael Rabinovich <michaelrabinovich27@gmail.com@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_FLIPPED_TRIANGLES_H
  9. #define IGL_FLIPPED_TRIANGLES_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. namespace igl
  13. {
  14. // Finds the ids of the flipped triangles of the mesh V,F in the UV mapping uv
  15. //
  16. // Inputs:
  17. // V #V by 2 list of mesh vertex positions
  18. // F #F by 3 list of mesh faces (must be triangles)
  19. // Outputs:
  20. // X #flipped list of containing the indices into F of the flipped triangles
  21. // Wrapper with return type
  22. template <typename DerivedV, typename DerivedF, typename DerivedX>
  23. IGL_INLINE void flipped_triangles(
  24. const Eigen::PlainObjectBase<DerivedV> & V,
  25. const Eigen::PlainObjectBase<DerivedF> & F,
  26. Eigen::PlainObjectBase<DerivedX> & X);
  27. template <typename Scalar, typename Index>
  28. IGL_INLINE Eigen::VectorXi flipped_triangles(
  29. const Eigen::PlainObjectBase<Scalar> & V,
  30. const Eigen::PlainObjectBase<Index> & F);
  31. }
  32. #ifndef IGL_STATIC_LIBRARY
  33. # include "flipped_triangles.cpp"
  34. #endif
  35. #endif