dqs.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 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_DQS_H
  9. #define IGL_DQS_H
  10. #include "igl_inline.h"
  11. #include <vector>
  12. #include <Eigen/Core>
  13. namespace igl
  14. {
  15. /// Dual quaternion skinning
  16. ///
  17. /// @param[in] V #V by 3 list of rest positions
  18. /// @param[in] W #W by #C list of weights
  19. /// @param[in] vQ #C list of rotation quaternions
  20. /// @param[in] vT #C list of translation vectors
  21. /// @param[out] U #V by 3 list of new positions
  22. template <
  23. typename DerivedV,
  24. typename DerivedW,
  25. typename Q,
  26. typename QAlloc,
  27. typename T,
  28. typename DerivedU>
  29. IGL_INLINE void dqs(
  30. const Eigen::MatrixBase<DerivedV> & V,
  31. const Eigen::MatrixBase<DerivedW> & W,
  32. const std::vector<Q,QAlloc> & vQ,
  33. const std::vector<T> & vT,
  34. Eigen::PlainObjectBase<DerivedU> & U);
  35. };
  36. #ifndef IGL_STATIC_LIBRARY
  37. # include "dqs.cpp"
  38. #endif
  39. #endif