dqs.h 780 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef IGL_DQS_H
  2. #define IGL_DQS_H
  3. #include "igl_inline.h"
  4. #include <vector>
  5. #include <Eigen/Core>
  6. namespace igl
  7. {
  8. // Dual quaternion skinning
  9. //
  10. // Inputs:
  11. // V #V by 3 list of rest positions
  12. // W #W by #C list of weights
  13. // vQ #C list of rotation quaternions
  14. // vT #C list of translation vectors
  15. // Outputs:
  16. // U #V by 3 list of new positions
  17. template <
  18. typename DerivedV,
  19. typename DerivedW,
  20. typename Q,
  21. typename T,
  22. typename DerivedU>
  23. IGL_INLINE void dqs(
  24. const Eigen::PlainObjectBase<DerivedV> & V,
  25. const Eigen::PlainObjectBase<DerivedW> & W,
  26. const std::vector<Q> & vQ,
  27. const std::vector<T> & vT,
  28. Eigen::PlainObjectBase<DerivedU> & U);
  29. };
  30. #ifdef IGL_HEADER_ONLY
  31. # include "dqs.cpp"
  32. #endif
  33. #endif