edge_flaps.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. //
  28. // TODO: This seems to be a duplicate of edge_topology.h
  29. IGL_INLINE void edge_flaps(
  30. const Eigen::MatrixXi & F,
  31. const Eigen::MatrixXi & E,
  32. const Eigen::VectorXi & EMAP,
  33. Eigen::MatrixXi & EF,
  34. Eigen::MatrixXi & EI);
  35. // Only faces as input
  36. IGL_INLINE void edge_flaps(
  37. const Eigen::MatrixXi & F,
  38. Eigen::MatrixXi & E,
  39. Eigen::VectorXi & EMAP,
  40. Eigen::MatrixXi & EF,
  41. Eigen::MatrixXi & EI);
  42. }
  43. #ifndef IGL_STATIC_LIBRARY
  44. # include "edge_flaps.cpp"
  45. #endif
  46. #endif