mesh_boolean.h 2.8 KB

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