peal_outer_hull_layers.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef PEAL_OUTER_HULL_LAYERS_H
  2. #define PEAL_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 "pealing" 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 peal (otherwise
  16. // an even iteration peal)
  17. // flip #F list of whether a facet's orientation was flipped when facet
  18. // "pealed" into its associated outer hull layer.
  19. template <
  20. typename DerivedV,
  21. typename DerivedF,
  22. typename Derivedodd,
  23. typename Derivedflip>
  24. IGL_INLINE void peal_outer_hull_layers(
  25. const Eigen::PlainObjectBase<DerivedV > & V,
  26. const Eigen::PlainObjectBase<DerivedF > & F,
  27. Eigen::PlainObjectBase<Derivedodd > & odd,
  28. Eigen::PlainObjectBase<Derivedflip > & flip);
  29. }
  30. #ifndef IGL_STATIC_LIBRARY
  31. # include "peal_outer_hull_layers.cpp"
  32. #endif
  33. #endif