peel_outer_hull_layers.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef PEEL_OUTER_HULL_LAYERS_H
  2. #define PEEL_OUTER_HULL_LAYERS_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. namespace igl
  6. {
  7. // Computes necessary generic information for boolean operations by
  8. // successively "peeling" off the "outer hull" of a mesh (V,F) resulting from
  9. // "resolving" all (self-)intersections.
  10. //
  11. // Inputs:
  12. // V #V by 3 list of vertex positions
  13. // F #F by 3 list of triangle indices into V
  14. // Outputs:
  15. // odd #F list of whether facet belongs to an odd iteration peel (otherwise
  16. // an even iteration peel)
  17. // flip #F list of whether a facet's orientation was flipped when facet
  18. // "peeled" into its associated outer hull layer.
  19. // Returns number of peels
  20. template <
  21. typename DerivedV,
  22. typename DerivedF,
  23. typename Derivedodd,
  24. typename Derivedflip>
  25. IGL_INLINE size_t peel_outer_hull_layers(
  26. const Eigen::PlainObjectBase<DerivedV > & V,
  27. const Eigen::PlainObjectBase<DerivedF > & F,
  28. Eigen::PlainObjectBase<Derivedodd > & odd,
  29. Eigen::PlainObjectBase<Derivedflip > & flip);
  30. }
  31. #ifndef IGL_STATIC_LIBRARY
  32. # include "peel_outer_hull_layers.cpp"
  33. #endif
  34. #endif