edge_lengths.h 955 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef IGL_EDGE_LENGTHS_H
  2. #define IGL_EDGE_LENGTHS_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Dense>
  5. namespace igl
  6. {
  7. // Constructs a list of lengths of edges opposite each index in a face
  8. // (triangle) list
  9. // Templates:
  10. // DerivedV derived from vertex positions matrix type: i.e. MatrixXd
  11. // DerivedF derived from face indices matrix type: i.e. MatrixXi
  12. // DerivedL derived from edge lengths matrix type: i.e. MatrixXd
  13. // Inputs:
  14. // V eigen matrix #V by 3
  15. // F #F by 3 list of mesh faces (must be triangles)
  16. // Outputs:
  17. // E #E by 2 list of edges in no particular order
  18. //
  19. // See also: adjacency_matrix
  20. template <typename DerivedV, typename DerivedF, typename DerivedL>
  21. IGL_INLINE void edge_lengths(
  22. const Eigen::PlainObjectBase<DerivedV>& V,
  23. const Eigen::PlainObjectBase<DerivedF>& F,
  24. Eigen::PlainObjectBase<DerivedL>& L);
  25. }
  26. #ifdef IGL_HEADER_ONLY
  27. # include "edge_lengths.cpp"
  28. #endif
  29. #endif