diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-21 10:46:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-21 10:48:33 +0300 |
commit | 59e166c568a57315b78c5ab812837c95923c300e (patch) | |
tree | 3bb1f901f1f1209fbee7449aeaa672c3487c88c6 /source/blender/blenkernel/intern/editmesh_bvh.c | |
parent | 71919efd78149a305bea4db18d80f9434abeca33 (diff) |
BVH-raycast: Use watertight intersections
By default watertight intersections are used,
For callbacks where its not needed,
BLI_bvhtree_ray_cast_ex can be called without the BVH_RAYCAST_WATERTIGHT flag.
Fixes T45286
Diffstat (limited to 'source/blender/blenkernel/intern/editmesh_bvh.c')
-rw-r--r-- | source/blender/blenkernel/intern/editmesh_bvh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/editmesh_bvh.c b/source/blender/blenkernel/intern/editmesh_bvh.c index 0e619f28622..07706a38deb 100644 --- a/source/blender/blenkernel/intern/editmesh_bvh.c +++ b/source/blender/blenkernel/intern/editmesh_bvh.c @@ -278,8 +278,13 @@ static void bmbvh_ray_cast_cb(void *userdata, int index, const BVHTreeRay *ray, isect = (ray->radius > 0.0f ? isect_ray_tri_epsilon_v3(ray->origin, ray->direction, tri_cos[0], tri_cos[1], tri_cos[2], &dist, uv, ray->radius) : +#ifdef USE_KDOPBVH_WATERTIGHT + isect_ray_tri_watertight_v3(ray->origin, ray->isect_precalc, + tri_cos[0], tri_cos[1], tri_cos[2], &dist, uv)); +#else isect_ray_tri_v3(ray->origin, ray->direction, tri_cos[0], tri_cos[1], tri_cos[2], &dist, uv)); +#endif if (isect && dist < hit->dist) { hit->dist = dist; |