moveFV.h 865 B

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