bone_heat.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 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_EMBREE_BONE_HEAT_H
  9. #define IGL_EMBREE_BONE_HEAT_H
  10. #include "../igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. namespace embree
  15. {
  16. // BONE_HEAT Compute skinning weights W given a surface mesh (V,F) and an
  17. // internal skeleton (C,BE) according to "Automatic Rigging" [Baran and
  18. // Popovic 2007].
  19. //
  20. // Inputs:
  21. // V #V by 3 list of mesh vertex positions
  22. // F #F by 3 list of mesh corner indices into V
  23. // C #C by 3 list of joint locations
  24. // P #P list of point handle indices into C
  25. // BE #BE by 2 list of bone edge indices into C
  26. // CE #CE by 2 list of cage edge indices into **P**
  27. // Outputs:
  28. // W #V by #P+#BE matrix of weights.
  29. // Returns true only on success.
  30. //
  31. IGL_INLINE bool bone_heat(
  32. const Eigen::MatrixXd & V,
  33. const Eigen::MatrixXi & F,
  34. const Eigen::MatrixXd & C,
  35. const Eigen::VectorXi & P,
  36. const Eigen::MatrixXi & BE,
  37. const Eigen::MatrixXi & CE,
  38. Eigen::MatrixXd & W);
  39. }
  40. };
  41. #ifndef IGL_STATIC_LIBRARY
  42. # include "bone_heat.cpp"
  43. #endif
  44. #endif