deform_skeleton.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 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_DEFORM_SKELETON_H
  9. #define IGL_DEFORM_SKELETON_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. #include <Eigen/Geometry>
  13. #include <vector>
  14. namespace igl
  15. {
  16. // Deform a skeleton.
  17. //
  18. // Inputs:
  19. // C #C by 3 list of joint positions
  20. // BE #BE by 2 list of bone edge indices
  21. // vA #BE list of bone transformations
  22. // Outputs
  23. // CT #BE*2 by 3 list of deformed joint positions
  24. // BET #BE by 2 list of bone edge indices (maintains order)
  25. //
  26. IGL_INLINE void deform_skeleton(
  27. const Eigen::MatrixXd & C,
  28. const Eigen::MatrixXi & BE,
  29. const std::vector<
  30. Eigen::Affine3d,Eigen::aligned_allocator<Eigen::Affine3d> > & vA,
  31. Eigen::MatrixXd & CT,
  32. Eigen::MatrixXi & BET);
  33. // Inputs:
  34. // T #BE*4 by 3 list of stacked transformation matrix
  35. IGL_INLINE void deform_skeleton(
  36. const Eigen::MatrixXd & C,
  37. const Eigen::MatrixXi & BE,
  38. const Eigen::MatrixXd & T,
  39. Eigen::MatrixXd & CT,
  40. Eigen::MatrixXi & BET);
  41. }
  42. #ifndef IGL_STATIC_LIBRARY
  43. # include "deform_skeleton.cpp"
  44. #endif
  45. #endif