Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2021-02-22 01:57:03 +0300
committerHoward Trickey <howard.trickey@gmail.com>2021-02-22 01:57:03 +0300
commita3f091d7ceda77181422625135225e55afa612c8 (patch)
treee0529be5ae4da66a1d7fbc3e35162b925f519dc5 /source/blender/blenkernel/BKE_mesh_boolean_convert.h
parent7883eb04ed3a3718a5a3b5e598c0e12eb9708d9f (diff)
Change Exact Boolean modifier to skip round trip through BMesh.
The Exact modifier code had been written to avoid using BMesh but in the initial release the modifier still converted all Meshes to BMeshes, and then after running the boolean code on the BMeshes, converted the result back to a Mesh. This change skips that. Most of the work here is in getting the Custom Data layers right. The approach taken is to merge default layers from all operand meshes into the final result, and then use the original verts, edges, polys, and loops to copy or interpolate the appropriate custom data layers from all operands into the result.
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh_boolean_convert.h')
-rw-r--r--source/blender/blenkernel/BKE_mesh_boolean_convert.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh_boolean_convert.h b/source/blender/blenkernel/BKE_mesh_boolean_convert.h
new file mode 100644
index 00000000000..be5cbb305fa
--- /dev/null
+++ b/source/blender/blenkernel/BKE_mesh_boolean_convert.h
@@ -0,0 +1,38 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2019 Blender Foundation.
+ * All rights reserved.
+ */
+
+#pragma once
+
+/** \file
+ * \ingroup bke
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+Mesh *BKE_mesh_boolean(const Mesh **meshes,
+ const float (*obmats[])[4][4],
+ const int meshes_len,
+ const bool use_self,
+ const int boolean_mode);
+
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file