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>2015-12-06 13:29:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-12-06 13:29:06 +0300
commit54b95c30ae8300c7633c0526f7ab5da310c5f93a (patch)
tree5a284bd005ff57ca6bba4c9a419df21ea903c103 /source/blender/blenlib/BLI_kdtree.h
parentee719e88169d169823013f9d21a999cc95c7cf13 (diff)
BKI_kdtree: add a find that takes filter callback
Useful when we need to selectively ignore nodes.
Diffstat (limited to 'source/blender/blenlib/BLI_kdtree.h')
-rw-r--r--source/blender/blenlib/BLI_kdtree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_kdtree.h b/source/blender/blenlib/BLI_kdtree.h
index d488dbce1fd..aa54e1c823c 100644
--- a/source/blender/blenlib/BLI_kdtree.h
+++ b/source/blender/blenlib/BLI_kdtree.h
@@ -58,6 +58,10 @@ int BLI_kdtree_find_nearest(
#define BLI_kdtree_range_search(tree, co, r_nearest, range) \
BLI_kdtree_range_search__normal(tree, co, NULL, r_nearest, range)
+int BLI_kdtree_find_nearest_cb(
+ const KDTree *tree, const float co[3],
+ int (*filter_cb)(void *user_data, int index, const float co[3], float dist_sq), void *user_data,
+ KDTreeNearest *r_nearest);
void BLI_kdtree_range_search_cb(
const KDTree *tree, const float co[3], float range,
bool (*search_cb)(void *user_data, int index, const float co[3], float dist_sq), void *user_data);