moveFV.h 698 B

1234567891011121314151617181920212223242526272829
  1. #ifndef IGL_MOVEFV_H
  2. #define IGL_MOVEFV_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Dense>
  5. namespace igl
  6. {
  7. // moveFV
  8. // Move a scalar field defined on faces to vertices by averaging
  9. //
  10. // Input:
  11. // V,F: mesh
  12. // S: scalar field defined on faces, Fx1
  13. //
  14. // Output:
  15. // SV: scalar field defined on vertices
  16. template <typename T, typename I>
  17. IGL_INLINE void moveFV(
  18. const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> &V,
  19. const Eigen::Matrix<I, Eigen::Dynamic, Eigen::Dynamic> &F,
  20. const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> &S,
  21. Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> &SV);
  22. }
  23. #ifdef IGL_HEADER_ONLY
  24. # include "moveFV.cpp"
  25. #endif
  26. #endif