mesh_boolean_cork.h 1.4 KB

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