mesh_with_skeleton.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef IGL_MESH_WITH_SKELETON_H
  2. #define IGL_MESH_WITH_SKELETON_H
  3. #include "../igl_inline.h"
  4. #include <Eigen/Dense>
  5. #include <string>
  6. namespace igl
  7. {
  8. // Mesh the interior of a given surface with tetrahedra which are graded (tend
  9. // to be small near the surface and large inside) and conform to the given
  10. // handles and samplings thereof.
  11. //
  12. // Inputs:
  13. // V #V by 3 list of mesh vertex positions
  14. // F #F by 3 list of triangle indices
  15. // C #C by 3 list of vertex positions
  16. // P #P list of point handle indices
  17. // BE #BE by 2 list of bone-edge indices
  18. // CE #CE by 2 list of cage-edge indices
  19. // samples_per_bone #samples to add per bone
  20. // tetgen_flags flags to pass to tetgen {""-->"pq2Y"} otherwise you're on
  21. // your own and it's your funeral if you pass nonsense flags
  22. // Outputs:
  23. // VV #VV by 3 list of tet-mesh vertex positions
  24. // TT #TT by 4 list of tetrahedra indices
  25. // FF #FF by 3 list of surface triangle indices
  26. // Returns true only on success
  27. bool mesh_with_skeleton(
  28. const Eigen::MatrixXd & V,
  29. const Eigen::MatrixXi & F,
  30. const Eigen::MatrixXd & C,
  31. const Eigen::VectorXi & /*P*/,
  32. const Eigen::MatrixXi & BE,
  33. const Eigen::MatrixXi & CE,
  34. const int samples_per_bone,
  35. const std::string & tetgen_flags,
  36. Eigen::MatrixXd & VV,
  37. Eigen::MatrixXi & TT,
  38. Eigen::MatrixXi & FF);
  39. // Wrapper using default tetgen_flags
  40. bool mesh_with_skeleton(
  41. const Eigen::MatrixXd & V,
  42. const Eigen::MatrixXi & F,
  43. const Eigen::MatrixXd & C,
  44. const Eigen::VectorXi & /*P*/,
  45. const Eigen::MatrixXi & BE,
  46. const Eigen::MatrixXi & CE,
  47. const int samples_per_bone,
  48. Eigen::MatrixXd & VV,
  49. Eigen::MatrixXi & TT,
  50. Eigen::MatrixXi & FF);
  51. }
  52. #ifdef IGL_HEADER_ONLY
  53. # include "mesh_with_skeleton.cpp"
  54. #endif
  55. #endif