sample_edges.h 783 B

123456789101112131415161718192021222324252627282930
  1. #ifndef IGL_SAMPLE_EDGES_H
  2. #define IGL_SAMPLE_EDGES_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Dense>
  5. namespace igl
  6. {
  7. // Compute samples_per_edge extra points along each edge in E defined over
  8. // vertices of V.
  9. //
  10. // Inputs:
  11. // V vertices over which edges are defined, # vertices by dim
  12. // E edge list, # edges by 2
  13. // k number of extra samples to be computed along edge not
  14. // including start and end points
  15. // Output:
  16. // S sampled vertices, size less than # edges * (2+k) by dim always begins
  17. // with V so that E is also defined over S
  18. void sample_edges(
  19. const Eigen::MatrixXd & V,
  20. const Eigen::MatrixXi & E,
  21. const int k,
  22. Eigen::MatrixXd & S);
  23. }
  24. #ifdef IGL_HEADER_ONLY
  25. # include "sample_edges.cpp"
  26. #endif
  27. #endif