edge_flaps.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Alec Jacobson <alecjacobson@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_EDGE_FLAPS_H
  9. #define IGL_EDGE_FLAPS_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. // Determine "edge flaps": two faces on either side of a unique edge (assumes
  15. // edge-manifold mesh)
  16. //
  17. // Inputs:
  18. // F #F by 3 list of face indices
  19. // E #E by 2 list of edge indices into V.
  20. // EMAP #F*3 list of indices into E, mapping each directed edge to unique
  21. // unique edge in E
  22. // Outputs:
  23. // EF #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of
  24. // F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) "
  25. // e=(j->i)
  26. // EI #E by 2 list of edge flap corners (see above).
  27. IGL_INLINE void edge_flaps(
  28. const Eigen::MatrixXi & F,
  29. const Eigen::MatrixXi & E,
  30. const Eigen::VectorXi & EMAP,
  31. Eigen::MatrixXi & EF,
  32. Eigen::MatrixXi & EI);
  33. // Only faces as input
  34. IGL_INLINE void edge_flaps(
  35. const Eigen::MatrixXi & F,
  36. Eigen::MatrixXi & E,
  37. Eigen::VectorXi & EMAP,
  38. Eigen::MatrixXi & EF,
  39. Eigen::MatrixXi & EI);
  40. }
  41. #ifndef IGL_STATIC_LIBRARY
  42. # include "edge_flaps.cpp"
  43. #endif
  44. #endif