Blender  V3.3
BLI_mesh_boolean.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
9 /* The boolean functions in Blenlib use exact arithmetic, so require GMP. */
10 #ifdef WITH_GMP
11 
12 # include "BLI_mesh_intersect.hh"
13 # include <functional>
14 
15 namespace blender::meshintersect {
16 
20 enum class BoolOpType {
21  None = -1,
22  /* Aligned with #BooleanModifierOp. */
23  Intersect = 0,
24  Union = 1,
25  Difference = 2,
26 };
27 
43 IMesh boolean_mesh(IMesh &imesh,
44  BoolOpType op,
45  int nshapes,
46  std::function<int(int)> shape_fn,
47  bool use_self,
48  bool hole_tolerant,
49  IMesh *imesh_triangulated,
50  IMeshArena *arena);
51 
57 IMesh boolean_trimesh(IMesh &tm_in,
58  BoolOpType op,
59  int nshapes,
60  std::function<int(int)> shape_fn,
61  bool use_self,
62  bool hole_tolerant,
63  IMeshArena *arena);
64 
65 } // namespace blender::meshintersect
66 
67 #endif /* WITH_GMP */
DBVT_INLINE bool Intersect(const btDbvtAabbMm &a, const btDbvtAabbMm &b)
Definition: btDbvt.h:621