circulation.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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_CIRCULATION_H
  9. #define IGL_CIRCULATION_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. #include <vector>
  13. namespace igl
  14. {
  15. // Return list of faces around the end point of an edge. Assumes
  16. // data-structures are built from an edge-manifold **closed** mesh.
  17. //
  18. // Inputs:
  19. // e index into E of edge to circulate
  20. // ccw whether to _continue_ in ccw direction of edge (circulate around
  21. // E(e,1))
  22. // EMAP #F*3 list of indices into E, mapping each directed edge to unique
  23. // unique edge in E
  24. // EF #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of
  25. // F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) "
  26. // e=(j->i)
  27. // EI #E by 2 list of edge flap corners (see above).
  28. // Returns list of faces touched by circulation (in cyclically order).
  29. //
  30. // See also: edge_flaps
  31. IGL_INLINE std::vector<int> circulation(
  32. const int e,
  33. const bool ccw,
  34. const Eigen::VectorXi & EMAP,
  35. const Eigen::MatrixXi & EF,
  36. const Eigen::MatrixXi & EI);
  37. // Wrapper with VectorXi output.
  38. IGL_INLINE void circulation(
  39. const int e,
  40. const bool ccw,
  41. const Eigen::VectorXi & EMAP,
  42. const Eigen::MatrixXi & EF,
  43. const Eigen::MatrixXi & EI,
  44. Eigen::VectorXi & vN);
  45. }
  46. #ifndef IGL_STATIC_LIBRARY
  47. # include "circulation.cpp"
  48. #endif
  49. #endif