[Bf-blender-cvs] [0ba6495] master: Cleanup: remove unused radius argument
Campbell Barton
noreply at git.blender.org
Wed Feb 10 19:54:52 CET 2016
Commit: 0ba649549c3f5320d41f83c4e99da3fe28c80c67
Author: Campbell Barton
Date: Thu Feb 11 05:47:05 2016 +1100
Branches: master
https://developer.blender.org/rB0ba649549c3f5320d41f83c4e99da3fe28c80c67
Cleanup: remove unused radius argument
===================================================================
M source/blender/blenlib/BLI_kdopbvh.h
M source/blender/blenlib/intern/BLI_kdopbvh.c
M source/blender/editors/transform/transform_snap.c
===================================================================
diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h
index d7ff55e..f1ef1d9 100644
--- a/source/blender/blenlib/BLI_kdopbvh.h
+++ b/source/blender/blenlib/BLI_kdopbvh.h
@@ -141,7 +141,7 @@ int BLI_bvhtree_find_nearest(
BVHTree_NearestPointCallback callback, void *userdata);
int BLI_bvhtree_find_nearest_to_ray(
- BVHTree *tree, const float co[3], const float dir[3], float radius, BVHTreeNearest *nearest,
+ BVHTree *tree, const float co[3], const float dir[3], BVHTreeNearest *nearest,
BVHTree_NearestToRayCallback callback, void *userdata);
int BLI_bvhtree_ray_cast_ex(
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index caf89ef..b7a4608 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -1512,8 +1512,9 @@ static void bfs_find_nearest(BVHNearestData *data, BVHNode *node)
#endif
-int BLI_bvhtree_find_nearest(BVHTree *tree, const float co[3], BVHTreeNearest *nearest,
- BVHTree_NearestPointCallback callback, void *userdata)
+int BLI_bvhtree_find_nearest(
+ BVHTree *tree, const float co[3], BVHTreeNearest *nearest,
+ BVHTree_NearestPointCallback callback, void *userdata)
{
axis_t axis_iter;
@@ -1870,6 +1871,13 @@ int BLI_bvhtree_ray_cast_all(
return BLI_bvhtree_ray_cast_all_ex(tree, co, dir, radius, callback, userdata, BVH_RAYCAST_DEFAULT);
}
+
+/* -------------------------------------------------------------------- */
+
+/** \name BLI_bvhtree_find_nearest_to_ray
+ *
+ * \{ */
+
static float calc_dist_sq_to_ray(BVHNearestRayData *data, BVHNode *node)
{
const float *bv = node->bv;
@@ -1926,8 +1934,8 @@ static void dfs_find_nearest_to_ray_begin(BVHNearestRayData *data, BVHNode *node
}
int BLI_bvhtree_find_nearest_to_ray(
- BVHTree *tree, const float co[3], const float dir[3], float radius, BVHTreeNearest *nearest,
- BVHTree_NearestToRayCallback callback, void *userdata)
+ BVHTree *tree, const float co[3], const float dir[3], BVHTreeNearest *nearest,
+ BVHTree_NearestToRayCallback callback, void *userdata)
{
BVHNearestRayData data;
BVHNode *root = tree->nodes[tree->totleaf];
@@ -1941,7 +1949,7 @@ int BLI_bvhtree_find_nearest_to_ray(
copy_v3_v3(data.ray.origin, co);
copy_v3_v3(data.ray.direction, dir);
- data.ray.radius = radius;
+ data.ray.radius = 0.0f; /* unused here */
dist_squared_ray_to_aabb_v3_precalc(&data.nearest_precalc, co, dir);
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 89bb63d..3622012 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -1673,7 +1673,7 @@ static bool snapDerivedMesh(
nearest.dist_sq = local_depth * local_depth;
if (treedata.tree &&
BLI_bvhtree_find_nearest_to_ray(
- treedata.tree, ray_start_local, ray_normal_local, 0.0f,
+ treedata.tree, ray_start_local, ray_normal_local,
&nearest, NULL, NULL) != -1)
{
const MVert *v = &treedata.vert[nearest.index];
More information about the Bf-blender-cvs
mailing list