draw_skeleton_3d.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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_DRAW_SKELETON_3D_H
  9. #define IGL_DRAW_SKELETON_3D_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. // Draw a skeleton
  15. //
  16. // Inputs:
  17. // C #C by dim List of joint rest positions
  18. // BE #BE by 2 list of bone edge indices into C
  19. // T #BE*(dim+1) by dim matrix of stacked transposed bone transformations
  20. template <typename DerivedC, typename DerivedBE, typename DerivedT>
  21. IGL_INLINE void draw_skeleton_3d(
  22. const Eigen::PlainObjectBase<DerivedC> & C,
  23. const Eigen::PlainObjectBase<DerivedBE> & BE,
  24. const Eigen::PlainObjectBase<DerivedT> & T);
  25. // Wrapper with each T = Identity
  26. template <typename DerivedC, typename DerivedBE>
  27. IGL_INLINE void draw_skeleton_3d(
  28. const Eigen::PlainObjectBase<DerivedC> & C,
  29. const Eigen::PlainObjectBase<DerivedBE> & BE);
  30. };
  31. #ifdef IGL_HEADER_ONLY
  32. # include "draw_skeleton_3d.h"
  33. #endif
  34. #endif