diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-07-29 14:14:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-07-29 14:22:28 +0300 |
commit | ba32d9d4cd2ad256722a4405d2b1909ec8d4d811 (patch) | |
tree | bf359b799a7e28ddc5f14cff2279a6eed946fdc2 /source/blender/blenkernel/intern/bvhutils.c | |
parent | 8e9534a850e593e7cd7bbb35c4326bb69eb5b58c (diff) |
Expose bvhtree_sphereray_tri_intersection for general use
Diffstat (limited to 'source/blender/blenkernel/intern/bvhutils.c')
-rw-r--r-- | source/blender/blenkernel/intern/bvhutils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index a7a9dc11fab..6131153480e 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -66,7 +66,7 @@ float bvhtree_ray_tri_intersection( return FLT_MAX; } -static float sphereray_tri_intersection( +float bvhtree_sphereray_tri_intersection( const BVHTreeRay *ray, float radius, const float m_dist, const float v0[3], const float v1[3], const float v2[3]) { @@ -194,7 +194,7 @@ static void mesh_faces_spherecast(void *userdata, int index, const BVHTreeRay *r if (data->sphere_radius == 0.0f) dist = bvhtree_ray_tri_intersection(ray, hit->dist, t0, t1, t2); else - dist = sphereray_tri_intersection(ray, data->sphere_radius, hit->dist, t0, t1, t2); + dist = bvhtree_sphereray_tri_intersection(ray, data->sphere_radius, hit->dist, t0, t1, t2); if (dist >= 0 && dist < hit->dist) { hit->index = index; @@ -229,7 +229,7 @@ static void mesh_looptri_spherecast(void *userdata, int index, const BVHTreeRay if (data->sphere_radius == 0.0f) dist = bvhtree_ray_tri_intersection(ray, hit->dist, UNPACK3(vtri_co)); else - dist = sphereray_tri_intersection(ray, data->sphere_radius, hit->dist, UNPACK3(vtri_co)); + dist = bvhtree_sphereray_tri_intersection(ray, data->sphere_radius, hit->dist, UNPACK3(vtri_co)); if (dist >= 0 && dist < hit->dist) { hit->index = index; @@ -257,7 +257,7 @@ static void editmesh_faces_spherecast(void *userdata, int index, const BVHTreeRa if (data->sphere_radius == 0.0f) dist = bvhtree_ray_tri_intersection(ray, hit->dist, t0, t1, t2); else - dist = sphereray_tri_intersection(ray, data->sphere_radius, hit->dist, t0, t1, t2); + dist = bvhtree_sphereray_tri_intersection(ray, data->sphere_radius, hit->dist, t0, t1, t2); if (dist >= 0 && dist < hit->dist) { hit->index = index; |