edge_exists_near.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2018 Alec Jacobson <[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_EDGE_EXISTS_NEAR_H
  9. #define IGL_EDGE_EXISTS_NEAR_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. #include <vector>
  13. namespace igl
  14. {
  15. /// Does edge (a,b) exist in the edges of all faces incident on
  16. /// existing unique edge uei.
  17. ///
  18. /// @param[in] uE #uE by 2 list of unique undirected edges
  19. /// @param[in] EMAP #F*3 list of indices into uE, mapping each directed edge to unique
  20. /// undirected edge
  21. /// @param[in] uE2E #uE list of lists of indices into E of coexisting edges
  22. /// @param[in] E #F*3 by 2 list of half-edges
  23. /// @param[in] a 1st end-point of query edge
  24. /// @param[in] b 2nd end-point of query edge
  25. /// @param[in] uei index into uE/uE2E of unique edge
  26. /// @return true if edge exists near uei.
  27. ///
  28. /// \see unique_edge_map
  29. template <
  30. typename DeriveduE,
  31. typename DerivedEMAP,
  32. typename uE2EType,
  33. typename Index>
  34. IGL_INLINE bool edge_exists_near(
  35. const Eigen::MatrixBase<DeriveduE> & uE,
  36. const Eigen::MatrixBase<DerivedEMAP> & EMAP,
  37. const std::vector<std::vector< uE2EType> > & uE2E,
  38. const Index & a,
  39. const Index & b,
  40. const Index & uei);
  41. }
  42. #ifndef IGL_STATIC_LIBRARY
  43. # include "edge_exists_near.cpp"
  44. #endif
  45. #endif