RangeTree API rewrite
authorCampbell Barton <ideasman42@gmail.com>
Thu, 13 Oct 2016 04:51:20 +0000 (15:51 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 26 Oct 2016 12:33:41 +0000 (23:33 +1100)
commit72921a1e43033d7fea998dd607a68250da5d93bd
treede5defe233ec5b73b6fd7bf8da07b6d4e8270cac
parent44522a5b98f908928e93ab32c9d6046de4342d9b
RangeTree API rewrite

Rewrite the current range-tree API used by dyn-topo undo
to avoid inefficiencies from stdc++'s set use.

- every call to `take_any` (called for all verts & faces)
  removed and added to the set.
- further range adjustment also took 2x btree edits.

This patch inlines a btree which is modified in-place,
so common resizing operations don't need to perform a remove & insert.
Ranges are stored in a list so `take_any` can access the first item
without a btree lookup.

Since range-tree isn't a bottleneck in sculpting, this only gives minor speedups.
Measured approx ~15% overall faster calculation for sculpting,
although this number time doesn't include GPU updates and depends on how
much edits fragment the range-tree.
extern/rangetree/CMakeLists.txt
extern/rangetree/README.blender
extern/rangetree/README.org [deleted file]
extern/rangetree/intern/generic_alloc_impl.h [new file with mode: 0644]
extern/rangetree/intern/range_tree.c [new file with mode: 0644]
extern/rangetree/range_tree.h [new file with mode: 0644]
extern/rangetree/range_tree.hh [deleted file]
extern/rangetree/range_tree_c_api.cc [deleted file]
extern/rangetree/range_tree_c_api.h [deleted file]
source/blender/bmesh/intern/bmesh_log.c