unique_edge_map.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef IGL_UNIQUE_EDGE_MAP_H
  2. #define IGL_UNIQUE_EDGE_MAP_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Dense>
  5. #include <vector>
  6. namespace igl
  7. {
  8. // Constuct relationships between facet "half"-(or rather "viewed")-edges E
  9. // to unique edges of the mesh seen as a graph.
  10. //
  11. // Inputs:
  12. // F #F by 3 list of simplices
  13. // Outputs:
  14. // E #F*3 by 2 list of all of directed edges
  15. // uE #uE by 2 list of unique undirected edges
  16. // EMAP #F*3 list of indices into uE, mapping each directed edge to unique
  17. // undirected edge
  18. // uE2E #uE list of lists of indices into E of coexisting edges
  19. template <
  20. typename DerivedF,
  21. typename DerivedE,
  22. typename DeriveduE,
  23. typename DerivedEMAP,
  24. typename uE2EType>
  25. IGL_INLINE void unique_edge_map(
  26. const Eigen::PlainObjectBase<DerivedF> & F,
  27. Eigen::PlainObjectBase<DerivedE> & E,
  28. Eigen::PlainObjectBase<DeriveduE> & uE,
  29. Eigen::PlainObjectBase<DerivedEMAP> & EMAP,
  30. std::vector<std::vector<uE2EType> > & uE2E);
  31. }
  32. #ifndef IGL_STATIC_LIBRARY
  33. # include "unique_edge_map.cpp"
  34. #endif
  35. #endif