Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-19 17:56:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-19 18:06:07 +0300
commit899fc0331c40bb8ca6d3673a418fe7ee90c3613a (patch)
treed127e0013dea28262e0f8f9e110fcf2265caf736 /source/blender/editors/util
parent7a937436ab14ec05542b3539a6262c7e78b3929b (diff)
BLI_kdtree: use 1d tree for select similar
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/select_utils.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/util/select_utils.c b/source/blender/editors/util/select_utils.c
index b2784aca7fa..b8167632fd9 100644
--- a/source/blender/editors/util/select_utils.c
+++ b/source/blender/editors/util/select_utils.c
@@ -97,7 +97,7 @@ int ED_select_similar_compare_float(const float delta, const float thresh, const
}
}
-bool ED_select_similar_compare_float_tree(const KDTree_3d *tree, const float length, const float thresh, const int compare)
+bool ED_select_similar_compare_float_tree(const KDTree_1d *tree, const float length, const float thresh, const int compare)
{
/* Length of the edge we want to compare against. */
float nearest_edge_length;
@@ -123,9 +123,8 @@ bool ED_select_similar_compare_float_tree(const KDTree_3d *tree, const float len
return false;
}
- KDTreeNearest_3d nearest;
- float dummy[3] = {nearest_edge_length, 0.0f, 0.0f};
- if (BLI_kdtree_3d_find_nearest(tree, dummy, &nearest) != -1) {
+ KDTreeNearest_1d nearest;
+ if (BLI_kdtree_1d_find_nearest(tree, &nearest_edge_length, &nearest) != -1) {
float delta = length - nearest.co[0];
return ED_select_similar_compare_float(delta, thresh, compare);
}