bone_heat.h 1.3 KB

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