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>2016-03-19 09:16:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-03-19 10:31:56 +0300
commit1a7596951aafcd0f9c0f112a79c9b6e79d6ac323 (patch)
tree0621c6f79127f9216b481e8df137be14b11699d4 /source/blender/blenlib/intern/BLI_kdopbvh.c
parent6aeb1f7f5609dc1e82b9b2d915e2ee54b3c467de (diff)
BLI_kdopbvh: Pass center to to range callback
Useful when BLI_bvhtree_range_query callback calculates a new position to measure from.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_kdopbvh.c')
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 22862b8e0d7..bba3fdb37bc 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -2009,7 +2009,7 @@ static void dfs_range_query(RangeQueryData *data, BVHNode *node)
/* Its a leaf.. call the callback */
if (node->children[i]->totnode == 0) {
data->hits++;
- data->callback(data->userdata, node->children[i]->index, dist_sq);
+ data->callback(data->userdata, node->children[i]->index, data->center, dist_sq);
}
else
dfs_range_query(data, node->children[i]);
@@ -2040,7 +2040,7 @@ int BLI_bvhtree_range_query(
/* Its a leaf.. call the callback */
if (root->totnode == 0) {
data.hits++;
- data.callback(data.userdata, root->index, dist_sq);
+ data.callback(data.userdata, root->index, co, dist_sq);
}
else
dfs_range_query(&data, root);