draw_skeleton_3d.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 "material_colors.h"
  12. #include <Eigen/Core>
  13. namespace igl
  14. {
  15. // Draw a skeleton
  16. //
  17. // Inputs:
  18. // C #C by dim List of joint rest positions
  19. // BE #BE by 2 list of bone edge indices into C
  20. // T #BE*(dim+1) by dim matrix of stacked transposed bone transformations
  21. // color #BE|1 by 4 list of color
  22. template <
  23. typename DerivedC,
  24. typename DerivedBE,
  25. typename DerivedT,
  26. typename Derivedcolor>
  27. IGL_INLINE void draw_skeleton_3d(
  28. const Eigen::PlainObjectBase<DerivedC> & C,
  29. const Eigen::PlainObjectBase<DerivedBE> & BE,
  30. const Eigen::PlainObjectBase<DerivedT> & T,
  31. const Eigen::PlainObjectBase<Derivedcolor> & color);
  32. // Default color
  33. template <typename DerivedC, typename DerivedBE, typename DerivedT>
  34. IGL_INLINE void draw_skeleton_3d(
  35. const Eigen::PlainObjectBase<DerivedC> & C,
  36. const Eigen::PlainObjectBase<DerivedBE> & BE,
  37. const Eigen::PlainObjectBase<DerivedT> & T);
  38. template <typename DerivedC, typename DerivedBE>
  39. IGL_INLINE void draw_skeleton_3d(
  40. const Eigen::PlainObjectBase<DerivedC> & C,
  41. const Eigen::PlainObjectBase<DerivedBE> & BE);
  42. };
  43. #ifndef IGL_STATIC_LIBRARY
  44. # include "draw_skeleton_3d.cpp"
  45. #endif
  46. #endif