[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47388] branches/meshdata_transfer/source/ blender/editors/object/object_vgroup.c: After reverting to binary tree, starting search at the top
Ove Murberg Henriksen
sorayasilvermoon at hotmail.com
Sun Jun 3 23:34:25 CEST 2012
Revision: 47388
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47388
Author: cyborgmuppet
Date: 2012-06-03 21:34:17 +0000 (Sun, 03 Jun 2012)
Log Message:
-----------
After reverting to binary tree, starting search at the top
by reseting nearest is marginally faster than using previous search.
Modified Paths:
--------------
branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c
Modified: branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c
===================================================================
--- branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c 2012-06-03 21:11:10 UTC (rev 47387)
+++ branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c 2012-06-03 21:34:17 UTC (rev 47388)
@@ -510,7 +510,8 @@
/* reset nearest */
nearest.dist = FLT_MAX;
- /* nearest.index = -1; when this is commented out, the next search is initiated by the index of the previous. */
+ /* With current binary tree its marginally faster to start searching at the top, as opposed to previous search. */
+ nearest.index = -1;
/* transform into target space */
mul_v3_m4v3(tmp_co, tmp_mat, mv_dst->co);
@@ -542,7 +543,8 @@
/* reset nearest */
nearest.dist = FLT_MAX;
- /* nearest.index = -1; when this is commented out, the next search is initiated by the index of the previous. */
+ /* With current binary tree its marginally faster to start searching at the top, as opposed to previous search. */
+ nearest.index = -1;
/* transform into target space */
mul_v3_m4v3(tmp_co, tmp_mat, mv_dst->co);
@@ -595,7 +597,8 @@
/* reset nearest */
nearest.dist = FLT_MAX;
- /* nearest.index = -1; when this is commented out, the next search is initiated by the index of the previous. */
+ /* With current binary tree its marginally faster to start searching at the top, as opposed to previous search. */
+ nearest.index = -1;
/* transform into target space */
mul_v3_m4v3(tmp_co, tmp_mat, mv_dst->co);
More information about the Bf-blender-cvs
mailing list