diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-10-13 07:51:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-10-26 15:33:41 +0300 |
commit | 72921a1e43033d7fea998dd607a68250da5d93bd (patch) | |
tree | de5defe233ec5b73b6fd7bf8da07b6d4e8270cac /source/blender/bmesh/intern/bmesh_log.c | |
parent | 44522a5b98f908928e93ab32c9d6046de4342d9b (diff) |
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.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_log.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c index 1f64f7b74cc..2591c33fc73 100644 --- a/source/blender/bmesh/intern/bmesh_log.c +++ b/source/blender/bmesh/intern/bmesh_log.c @@ -45,7 +45,7 @@ #include "bmesh.h" #include "bmesh_log.h" -#include "range_tree_c_api.h" +#include "range_tree.h" #include "BLI_strict_flags.h" |