diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-22 17:15:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-22 17:40:03 +0300 |
commit | 6dfe4cbc6b8717223c631e80af6c7552576966e1 (patch) | |
tree | 5fb0e2103cc6e8926370a5b1cee9a95fff4726a0 /tests/gtests | |
parent | 57a0cb797d60024357a3e3a64c1873844b0178bd (diff) |
Polyfill Beautify: half-edge optimization
Was using an edge hash for triangle -> edge lookups,
updating triangle indices for each edge-rotation.
Replace this with half-edge which can rotate edges much more simply,
writing triangles back once the solution has been calculated.
Gives ~33% speedup in own tests.
Diffstat (limited to 'tests/gtests')
-rw-r--r-- | tests/gtests/blenlib/BLI_polyfill2d_test.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/gtests/blenlib/BLI_polyfill2d_test.cc b/tests/gtests/blenlib/BLI_polyfill2d_test.cc index df98ead4cb9..235bae3e5ff 100644 --- a/tests/gtests/blenlib/BLI_polyfill2d_test.cc +++ b/tests/gtests/blenlib/BLI_polyfill2d_test.cc @@ -13,7 +13,6 @@ extern "C" { #include "BLI_array_utils.h" #include "BLI_polyfill2d.h" #include "BLI_math.h" -#include "BLI_edgehash.h" #include "MEM_guardedalloc.h" #ifdef USE_OBJ_PREVIEW @@ -195,17 +194,15 @@ static void test_polyfill_template( { MemArena *pf_arena = BLI_memarena_new(BLI_POLYFILL_ARENA_SIZE, __func__); Heap *pf_heap = BLI_heap_new_ex(BLI_POLYFILL_ALLOC_NGON_RESERVE); - EdgeHash *pf_ehash = BLI_edgehash_new_ex(__func__, BLI_POLYFILL_ALLOC_NGON_RESERVE); BLI_polyfill_beautify( poly, poly_tot, tris, - pf_arena, pf_heap, pf_ehash); + pf_arena, pf_heap); test_polyfill_template_check(id, is_degenerate, poly, poly_tot, tris, tris_tot); BLI_memarena_free(pf_arena); BLI_heap_free(pf_heap, NULL); - BLI_edgehash_free(pf_ehash, NULL); } #endif } |