mesh_boolean.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Qingnan Zhou <qnzhou@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. //
  9. #ifndef IGL_BOOLEAN_MESH_BOOLEAN_H
  10. #define IGL_BOOLEAN_MESH_BOOLEAN_H
  11. #include <igl/igl_inline.h>
  12. #include "MeshBooleanType.h"
  13. #include <Eigen/Core>
  14. #include <functional>
  15. namespace igl
  16. {
  17. namespace boolean
  18. {
  19. template <
  20. typename DerivedVA,
  21. typename DerivedFA,
  22. typename DerivedVB,
  23. typename DerivedFB,
  24. typename WindingNumberOp,
  25. typename IsInsideFunc,
  26. typename ResolveFunc,
  27. typename DerivedVC,
  28. typename DerivedFC,
  29. typename DerivedJ>
  30. IGL_INLINE void per_face_winding_number_binary_operation(
  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 WindingNumberOp& wind_num_op,
  36. const IsInsideFunc& is_inside,
  37. const ResolveFunc& resolve_fun,
  38. Eigen::PlainObjectBase<DerivedVC > & VC,
  39. Eigen::PlainObjectBase<DerivedFC > & FC,
  40. Eigen::PlainObjectBase<DerivedJ > & J);
  41. template <
  42. typename DerivedVA,
  43. typename DerivedFA,
  44. typename DerivedVB,
  45. typename DerivedFB,
  46. typename DerivedVC,
  47. typename DerivedFC,
  48. typename DerivedJ>
  49. IGL_INLINE void mesh_boolean(
  50. const Eigen::PlainObjectBase<DerivedVA > & VA,
  51. const Eigen::PlainObjectBase<DerivedFA > & FA,
  52. const Eigen::PlainObjectBase<DerivedVB > & VB,
  53. const Eigen::PlainObjectBase<DerivedFB > & FB,
  54. const MeshBooleanType & type,
  55. Eigen::PlainObjectBase<DerivedVC > & VC,
  56. Eigen::PlainObjectBase<DerivedFC > & FC,
  57. Eigen::PlainObjectBase<DerivedJ > & J);
  58. template <
  59. typename DerivedVA,
  60. typename DerivedFA,
  61. typename DerivedVB,
  62. typename DerivedFB,
  63. typename DerivedVC,
  64. typename DerivedFC>
  65. IGL_INLINE void mesh_boolean(
  66. const Eigen::PlainObjectBase<DerivedVA > & VA,
  67. const Eigen::PlainObjectBase<DerivedFA > & FA,
  68. const Eigen::PlainObjectBase<DerivedVB > & VB,
  69. const Eigen::PlainObjectBase<DerivedFB > & FB,
  70. const MeshBooleanType & type,
  71. Eigen::PlainObjectBase<DerivedVC > & VC,
  72. Eigen::PlainObjectBase<DerivedFC > & FC);
  73. }
  74. }
  75. #ifndef IGL_STATIC_LIBRARY
  76. # include "mesh_boolean.cpp"
  77. #endif
  78. #endif