sample_edges.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
  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_SAMPLE_EDGES_H
  9. #define IGL_SAMPLE_EDGES_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. namespace igl
  13. {
  14. // Compute samples_per_edge extra points along each edge in E defined over
  15. // vertices of V.
  16. //
  17. // Inputs:
  18. // V vertices over which edges are defined, # vertices by dim
  19. // E edge list, # edges by 2
  20. // k number of extra samples to be computed along edge not
  21. // including start and end points
  22. // Output:
  23. // S sampled vertices, size less than # edges * (2+k) by dim always begins
  24. // with V so that E is also defined over S
  25. IGL_INLINE void sample_edges(
  26. const Eigen::MatrixXd & V,
  27. const Eigen::MatrixXi & E,
  28. const int k,
  29. Eigen::MatrixXd & S);
  30. }
  31. #ifndef IGL_STATIC_LIBRARY
  32. # include "sample_edges.cpp"
  33. #endif
  34. #endif