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>2020-11-24 03:30:40 +0300
committerHoward Trickey <howard.trickey@gmail.com>2020-11-24 03:30:40 +0300
commit246c11634f75fa40c03bbec4439a1bdc3719f8cf (patch)
tree540d4f3e47fe906486bdc4f2f68b951c5261f0c5 /source/blender/bmesh
parentb0a9081883778d134d0e8e2b411cf2d3c1523770 (diff)
Speedups for new boolean. Better hash function for verts.
The existing hash function didn't work well with Set's method of masking to the lower bits, because many verts have zeros in the lower bits. Also, replaced VectorSet with Set for Vert deduping.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/tools/bmesh_boolean.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/bmesh/tools/bmesh_boolean.cc b/source/blender/bmesh/tools/bmesh_boolean.cc
index 39b425a41df..6031e160c8c 100644
--- a/source/blender/bmesh/tools/bmesh_boolean.cc
+++ b/source/blender/bmesh/tools/bmesh_boolean.cc
@@ -52,7 +52,7 @@ static IMesh mesh_from_bm(BMesh *bm,
BM_mesh_elem_index_ensure(bm, BM_VERT | BM_EDGE | BM_FACE);
BM_mesh_elem_table_ensure(bm, BM_VERT | BM_EDGE | BM_FACE);
/* Account for triangulation and intersects. */
- const int estimate_num_outv = (3 * bm->totvert) / 2;
+ const int estimate_num_outv = 3 * bm->totvert;
const int estimate_num_outf = 4 * bm->totface;
arena->reserve(estimate_num_outv, estimate_num_outf);
Array<const Vert *> vert(bm->totvert);