deform_skeleton.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 <Eigen/StdVector>
  14. #include <vector>
  15. namespace igl
  16. {
  17. // Deform a skeleton.
  18. //
  19. // Inputs:
  20. // C #C by 3 list of joint positions
  21. // BE #BE by 2 list of bone edge indices
  22. // vA #BE list of bone transformations
  23. // Outputs
  24. // CT #BE*2 by 3 list of deformed joint positions
  25. // BET #BE by 2 list of bone edge indices (maintains order)
  26. //
  27. IGL_INLINE void deform_skeleton(
  28. const Eigen::MatrixXd & C,
  29. const Eigen::MatrixXi & BE,
  30. const std::vector<
  31. Eigen::Affine3d,Eigen::aligned_allocator<Eigen::Affine3d> > & vA,
  32. Eigen::MatrixXd & CT,
  33. Eigen::MatrixXi & BET);
  34. // Inputs:
  35. // T #BE*4 by 3 list of stacked transformation matrix
  36. IGL_INLINE void deform_skeleton(
  37. const Eigen::MatrixXd & C,
  38. const Eigen::MatrixXi & BE,
  39. const Eigen::MatrixXd & T,
  40. Eigen::MatrixXd & CT,
  41. Eigen::MatrixXi & BET);
  42. }
  43. #ifndef IGL_STATIC_LIBRARY
  44. # include "deform_skeleton.cpp"
  45. #endif
  46. #endif