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 <[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_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. /// @param[in] C #C by 3 list of joint positions
  20. /// @param[in] BE #BE by 2 list of bone edge indices
  21. /// @param[in] vA #BE list of bone transformations
  22. /// @param[out] CT #BE*2 by 3 list of deformed joint positions
  23. /// @param[out] BET #BE by 2 list of bone edge indices (maintains order)
  24. ///
  25. IGL_INLINE void deform_skeleton(
  26. const Eigen::MatrixXd & C,
  27. const Eigen::MatrixXi & BE,
  28. const std::vector<
  29. Eigen::Affine3d,Eigen::aligned_allocator<Eigen::Affine3d> > & vA,
  30. Eigen::MatrixXd & CT,
  31. Eigen::MatrixXi & BET);
  32. /// \overload
  33. ///
  34. /// @param[in] 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