mesh_boolean_cork.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef MESH_BOOLEAN_CORK_H
  2. #define MESH_BOOLEAN_CORK_H
  3. #ifndef IGL_NO_CORK
  4. #include "MeshBooleanType.h"
  5. #include <igl/igl_inline.h>
  6. #include <Eigen/Core>
  7. #include <cork.h> // for consistent uint
  8. namespace igl
  9. {
  10. // Compute a boolean operation on two input meshes using the cork library.
  11. //
  12. // Inputs:
  13. // VA #VA by 3 list of vertex positions of first mesh
  14. // FA #FA by 3 list of triangle indices into VA
  15. // VB #VB by 3 list of vertex positions of second mesh
  16. // FB #FB by 3 list of triangle indices into VB
  17. // type of boolean operation see MeshBooleanType.h
  18. // Outputs:
  19. // VC #VC by 3 list of vertex positions of output mesh
  20. // FC #FC by 3 list of triangle indices into VC
  21. template <
  22. typename DerivedVA,
  23. typename DerivedFA,
  24. typename DerivedVB,
  25. typename DerivedFB,
  26. typename DerivedVC,
  27. typename DerivedFC>
  28. IGL_INLINE void mesh_boolean_cork(
  29. const Eigen::PlainObjectBase<DerivedVA > & VA,
  30. const Eigen::PlainObjectBase<DerivedFA > & FA,
  31. const Eigen::PlainObjectBase<DerivedVB > & VB,
  32. const Eigen::PlainObjectBase<DerivedFB > & FB,
  33. const MeshBooleanType & type,
  34. Eigen::PlainObjectBase<DerivedVC > & VC,
  35. Eigen::PlainObjectBase<DerivedFC > & FC);
  36. }
  37. #ifndef IGL_STATIC_LIBRARY
  38. # include "mesh_boolean_cork.cpp"
  39. #endif
  40. #endif
  41. #endif