dqs.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Alec Jacobson <alecjacobson@gmail.com>
  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. // Inputs:
  18. // V #V by 3 list of rest positions
  19. // W #W by #C list of weights
  20. // vQ #C list of rotation quaternions
  21. // vT #C list of translation vectors
  22. // Outputs:
  23. // U #V by 3 list of new positions
  24. template <
  25. typename DerivedV,
  26. typename DerivedW,
  27. typename Q,
  28. typename QAlloc,
  29. typename T,
  30. typename DerivedU>
  31. IGL_INLINE void dqs(
  32. const Eigen::PlainObjectBase<DerivedV> & V,
  33. const Eigen::PlainObjectBase<DerivedW> & W,
  34. const std::vector<Q,QAlloc> & vQ,
  35. const std::vector<T> & vT,
  36. Eigen::PlainObjectBase<DerivedU> & U);
  37. };
  38. #ifndef IGL_STATIC_LIBRARY
  39. # include "dqs.cpp"
  40. #endif
  41. #endif