closest_facet.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef CLOSEST_FACET_H
  2. #define CLOSEST_FACET_H
  3. #include "../igl_inline.h"
  4. #include <Eigen/Core>
  5. namespace igl {
  6. namespace cgal {
  7. // Determine the closest facet for each of the input points.
  8. //
  9. // Inputs:
  10. // V #V by 3 array of vertices.
  11. // F #F by 3 array of faces.
  12. // I #I list of triangle indices to consider.
  13. // P #P by 3 array of query points.
  14. //
  15. // Outputs:
  16. // R #P list of closest facet indices.
  17. // S #P list of bools indicating on which side of the closest facet
  18. // each query point lies.
  19. template<
  20. typename DerivedV,
  21. typename DerivedF,
  22. typename DerivedI,
  23. typename DerivedP,
  24. typename DerivedR,
  25. typename DerivedS >
  26. IGL_INLINE void closest_facet(
  27. const Eigen::PlainObjectBase<DerivedV>& V,
  28. const Eigen::PlainObjectBase<DerivedF>& F,
  29. const Eigen::PlainObjectBase<DerivedI>& I,
  30. const Eigen::PlainObjectBase<DerivedP>& P,
  31. Eigen::PlainObjectBase<DerivedR>& R,
  32. Eigen::PlainObjectBase<DerivedS>& S);
  33. template<
  34. typename DerivedV,
  35. typename DerivedF,
  36. typename DerivedP,
  37. typename DerivedR,
  38. typename DerivedS >
  39. IGL_INLINE void closest_facet(
  40. const Eigen::PlainObjectBase<DerivedV>& V,
  41. const Eigen::PlainObjectBase<DerivedF>& F,
  42. const Eigen::PlainObjectBase<DerivedP>& P,
  43. Eigen::PlainObjectBase<DerivedR>& R,
  44. Eigen::PlainObjectBase<DerivedS>& S);
  45. }
  46. }
  47. #ifndef IGL_STATIC_LIBRARY
  48. #include "closest_facet.cpp"
  49. #endif
  50. #endif