mesh_boolean.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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_BOOLEAN_MESH_BOOLEAN_H
  11. #define IGL_BOOLEAN_MESH_BOOLEAN_H
  12. #include <igl/igl_inline.h>
  13. #include "MeshBooleanType.h"
  14. #include <Eigen/Core>
  15. #include <functional>
  16. namespace igl
  17. {
  18. namespace boolean
  19. {
  20. template <
  21. typename DerivedVA,
  22. typename DerivedFA,
  23. typename DerivedVB,
  24. typename DerivedFB,
  25. typename WindingNumberOp,
  26. typename IsInsideFunc,
  27. typename ResolveFunc,
  28. typename DerivedVC,
  29. typename DerivedFC,
  30. typename DerivedJ>
  31. IGL_INLINE void per_face_winding_number_binary_operation(
  32. const Eigen::PlainObjectBase<DerivedVA> & VA,
  33. const Eigen::PlainObjectBase<DerivedFA> & FA,
  34. const Eigen::PlainObjectBase<DerivedVB> & VB,
  35. const Eigen::PlainObjectBase<DerivedFB> & FB,
  36. const WindingNumberOp& wind_num_op,
  37. const IsInsideFunc& is_inside,
  38. const ResolveFunc& resolve_fun,
  39. Eigen::PlainObjectBase<DerivedVC > & VC,
  40. Eigen::PlainObjectBase<DerivedFC > & FC,
  41. Eigen::PlainObjectBase<DerivedJ > & J);
  42. template <
  43. typename DerivedVA,
  44. typename DerivedFA,
  45. typename DerivedVB,
  46. typename DerivedFB,
  47. typename DerivedVC,
  48. typename DerivedFC,
  49. typename DerivedJ>
  50. IGL_INLINE void mesh_boolean(
  51. const Eigen::PlainObjectBase<DerivedVA > & VA,
  52. const Eigen::PlainObjectBase<DerivedFA > & FA,
  53. const Eigen::PlainObjectBase<DerivedVB > & VB,
  54. const Eigen::PlainObjectBase<DerivedFB > & FB,
  55. const MeshBooleanType & type,
  56. Eigen::PlainObjectBase<DerivedVC > & VC,
  57. Eigen::PlainObjectBase<DerivedFC > & FC,
  58. Eigen::PlainObjectBase<DerivedJ > & J);
  59. template <
  60. typename DerivedVA,
  61. typename DerivedFA,
  62. typename DerivedVB,
  63. typename DerivedFB,
  64. typename DerivedVC,
  65. typename DerivedFC>
  66. IGL_INLINE void mesh_boolean(
  67. const Eigen::PlainObjectBase<DerivedVA > & VA,
  68. const Eigen::PlainObjectBase<DerivedFA > & FA,
  69. const Eigen::PlainObjectBase<DerivedVB > & VB,
  70. const Eigen::PlainObjectBase<DerivedFB > & FB,
  71. const MeshBooleanType & type,
  72. Eigen::PlainObjectBase<DerivedVC > & VC,
  73. Eigen::PlainObjectBase<DerivedFC > & FC);
  74. }
  75. }
  76. #ifndef IGL_STATIC_LIBRARY
  77. # include "mesh_boolean.cpp"
  78. #endif
  79. #endif