sample_edges.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <[email protected]>
  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 k extra points along each edge in E defined over
  15. /// vertices of V.
  16. ///
  17. /// @param[in] V vertices over which edges are defined, # vertices by dim
  18. /// @param[in] E edge list, # edges by 2
  19. /// @param[in] k number of extra samples to be computed along edge not
  20. /// including start and end points
  21. /// @param[out] S sampled vertices, size less than # edges * (2+k) by dim always begins
  22. /// with V so that E is also defined over S
  23. IGL_INLINE void sample_edges(
  24. const Eigen::MatrixXd & V,
  25. const Eigen::MatrixXi & E,
  26. const int k,
  27. Eigen::MatrixXd & S);
  28. }
  29. #ifndef IGL_STATIC_LIBRARY
  30. # include "sample_edges.cpp"
  31. #endif
  32. #endif