outer_facet.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef IGL_OUTER_FACET_H
  2. #define IGL_OUTER_FACET_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. namespace igl
  6. {
  7. // Compute a single facet which is guaranteed to be part of the "outer hull of
  8. // a mesh (V,F). This implementation follows Section 3.6 of "Direct repair of
  9. // self-intersecting meshes" [Attene 2014].
  10. //
  11. // Inputs:
  12. // V #V by 3 list of vertex positions
  13. // F #F by 3 list of triangle indices into V
  14. // N #F by 3 list of face normals
  15. // I #I list of facets to actually consider
  16. // Outputs:
  17. // f index of facet into V
  18. // flip whether facet's orientation should be flipped so that
  19. // counter-clockwise normal points outward.
  20. //
  21. // See also: outer_hull.h
  22. template <
  23. typename DerivedV,
  24. typename DerivedF,
  25. typename DerivedN,
  26. typename DerivedI,
  27. typename f_type>
  28. IGL_INLINE void outer_facet(
  29. const Eigen::PlainObjectBase<DerivedV> & V,
  30. const Eigen::PlainObjectBase<DerivedF> & F,
  31. const Eigen::PlainObjectBase<DerivedN> & N,
  32. const Eigen::PlainObjectBase<DerivedI> & I,
  33. f_type & f,
  34. bool & flip);
  35. }
  36. #ifndef IGL_STATIC_LIBRARY
  37. # include "outer_facet.cpp"
  38. #endif
  39. #endif