bone_visible.h 903 B

1234567891011121314151617181920212223242526272829
  1. #ifndef BONE_VISIBLE_H
  2. #define BONE_VISIBLE_H
  3. #include <Eigen/Core>
  4. //
  5. // BONE_VISIBLE test whether vertices of mesh are "visible" to a given bone,
  6. // where "visible" is defined as in [Baran & Popovic 07].
  7. //
  8. // [flag] = bone_visible(V,F,s,d);
  9. //
  10. // Input:
  11. // s row vector of position of start end point of bone
  12. // d row vector of position of dest end point of bone
  13. // V #V by 3 list of vertex positions
  14. // F #F by 3 list of triangle indices
  15. // Output:
  16. // flag #V by 1 list of bools (true) visible, (false) obstructed
  17. //
  18. template <
  19. typename DerivedV,
  20. typename DerivedF,
  21. typename DerivedSD,
  22. typename Derivedflag>
  23. void bone_visible(
  24. const Eigen::PlainObjectBase<DerivedV> & V,
  25. const Eigen::PlainObjectBase<DerivedF> & F,
  26. const Eigen::PlainObjectBase<DerivedSD> & s,
  27. const Eigen::PlainObjectBase<DerivedSD> & d,
  28. Eigen::PlainObjectBase<Derivedflag> & flag);
  29. #endif