draw_skeleton_vector_graphics.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_VECTOR_GRAPHICS_H
  9. #define IGL_DRAW_SKELETON_VECTOR_GRAPHICS_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. // Draw a skeleton with a 2D vector graphcis style à la BBW, STBS, Monotonic,
  15. // FAST papers.
  16. //
  17. // Inputs:
  18. // C #C by dim list of joint positions
  19. // BE #BE by 2 list of bone edge indices into C
  20. // point_color color of points
  21. // line_color color of lines
  22. IGL_INLINE void draw_skeleton_vector_graphics(
  23. const Eigen::MatrixXd & C,
  24. const Eigen::MatrixXi & BE,
  25. const float * point_color,
  26. const float * line_color);
  27. // Use default colors (originally from BBW paper)
  28. IGL_INLINE void draw_skeleton_vector_graphics(
  29. const Eigen::MatrixXd & C,
  30. const Eigen::MatrixXi & BE);
  31. // T #BE*(dim+1) by dim matrix of stacked transposed bone transformations
  32. template <typename DerivedC, typename DerivedBE, typename DerivedT>
  33. IGL_INLINE void draw_skeleton_vector_graphics(
  34. const Eigen::PlainObjectBase<DerivedC> & C,
  35. const Eigen::PlainObjectBase<DerivedBE> & BE,
  36. const Eigen::PlainObjectBase<DerivedT> & T);
  37. }
  38. #ifdef IGL_HEADER_ONLY
  39. # include "draw_skeleton_vector_graphics.h"
  40. #endif
  41. #endif