Blender V4.3
BLI_mesh_boolean.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
11/* The boolean functions in Blenlib use exact arithmetic, so require GMP. */
12#ifdef WITH_GMP
13
14# include "BLI_function_ref.hh"
15# include "BLI_mesh_intersect.hh"
16
17namespace blender::meshintersect {
18
23enum class BoolOpType {
24 None = -1,
25 /* Aligned with #BooleanModifierOp. */
26 Intersect = 0,
27 Union = 1,
28 Difference = 2,
29};
30
46IMesh boolean_mesh(IMesh &imesh,
47 BoolOpType op,
48 int nshapes,
49 FunctionRef<int(int)> shape_fn,
50 bool use_self,
51 bool hole_tolerant,
52 IMesh *imesh_triangulated,
53 IMeshArena *arena);
54
65IMesh boolean_trimesh(IMesh &tm_in,
66 BoolOpType op,
67 int nshapes,
68 FunctionRef<int(int)> shape_fn,
69 bool use_self,
70 bool hole_tolerant,
71 IMeshArena *arena);
72
73} // namespace blender::meshintersect
74
75#endif /* WITH_GMP */
DBVT_INLINE bool Intersect(const btDbvtAabbMm &a, const btDbvtAabbMm &b)
Definition btDbvt.h:621