diff options
author | Martin Poirier <theeth@yahoo.com> | 2008-07-15 23:38:48 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2008-07-15 23:38:48 +0400 |
commit | 08039ef38fa6d39f756860032659cc3678137ced (patch) | |
tree | ea8d68956b07c52a6547f81dd1c9a6d592f1f920 /source/blender/blenlib | |
parent | ac6641664e79fee9b8e503c6db278f5739ddb317 (diff) |
Optimization method selectable at runtime
Start multi resolution match from node, not arc (solve problem with Rinky)
various uglyness being cleaned up or factored out
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_graph.h | 2 | ||||
-rw-r--r-- | source/blender/blenlib/intern/graph.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_graph.h b/source/blender/blenlib/BLI_graph.h index d309d73fbee..dba02932e02 100644 --- a/source/blender/blenlib/BLI_graph.h +++ b/source/blender/blenlib/BLI_graph.h @@ -80,6 +80,8 @@ void BLI_freeAdjacencyList(BGraph *rg); int BLI_FlagSubgraphs(BGraph *graph); +#define SHAPE_RADIX 10 /* each shape level is encoded this base */ + int BLI_subtreeShape(BNode *node, BArc *rootArc, int include_root); float BLI_subtreeLength(BNode *node, BArc *rootArc); void BLI_calcGraphLength(BGraph *graph); diff --git a/source/blender/blenlib/intern/graph.c b/source/blender/blenlib/intern/graph.c index a3089369c22..fce9d0b6d95 100644 --- a/source/blender/blenlib/intern/graph.c +++ b/source/blender/blenlib/intern/graph.c @@ -354,7 +354,7 @@ int BLI_subtreeShape(BNode *node, BArc *rootArc, int include_root) } } - return 10 * depth + 1; + return SHAPE_RADIX * depth + 1; } } |