edge_crossings.h 990 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef IGL_EDGE_CROSSINGS_H
  2. #define IGL_EDGE_CROSSINGS_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. #include <unordered_map>
  6. namespace igl
  7. {
  8. /// Compute the each point that a scalar field crosses a specified value along
  9. /// an edge of a mesh.
  10. ///
  11. /// @param[in] uE #E by 2 list of edge indices
  12. /// @param[in] S #V by 1 list of scalar field values
  13. /// @param[in] val value to check for crossings
  14. /// @param[out] uE2I #T map from edge index to index in T
  15. /// @param[out] T #T by 1 list of parametric coordinates of crossings
  16. ///
  17. /// \see isolines, isolines_intrinsic
  18. template <
  19. typename DeriveduE,
  20. typename DerivedS,
  21. typename DerivedT>
  22. void edge_crossings(
  23. const Eigen::MatrixBase<DeriveduE> & uE,
  24. const Eigen::MatrixBase<DerivedS> & S,
  25. const typename DerivedS::Scalar val,
  26. std::unordered_map<int,int> & uE2I,
  27. Eigen::PlainObjectBase<DerivedT> & T);
  28. }
  29. #ifndef IGL_STATIC_LIBRARY
  30. # include "edge_crossings.cpp"
  31. #endif
  32. #endif