bone_heat.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 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_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. /// 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. /// @param[in] V #V by 3 list of mesh vertex positions
  21. /// @param[in] F #F by 3 list of mesh corner indices into V
  22. /// @param[in] C #C by 3 list of joint locations
  23. /// @param[in] P #P list of point handle indices into C
  24. /// @param[in] BE #BE by 2 list of bone edge indices into C
  25. /// @param[in] CE #CE by 2 list of cage edge indices into **P**
  26. /// @param[out] W #V by #P+#BE matrix of weights.
  27. /// @return 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. };
  39. #ifndef IGL_STATIC_LIBRARY
  40. # include "bone_heat.cpp"
  41. #endif
  42. #endif