diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-01-12 11:37:56 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-01-12 12:09:00 +0300 |
commit | c6c223ade6470e7a9b61ea4a4a3ab6ed62abe79d (patch) | |
tree | fb9323466d1c45ff6a99db96fc649fe3e6374249 /source/blender/blenkernel/intern/dynamicpaint.c | |
parent | 90250f856817b68f29924be8a60152ec3a2486a8 (diff) |
Fix T47164: [Scene.raycast] - True result when it should be False.
We cannot use FLT_MAX as initi distance for raycast...
Renamed TRANSFORM_DIST_MAX_RAY to BVH_RAYCAST_DIST_MAX, moved it into BLI_kdopbvh,
and use in RNA raycast callbacks (and all other places using that API).
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 67a6d067aba..3ed148023a3 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -3274,7 +3274,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface, add_v3_fl(ray_start, 0.001f); hit.index = -1; - hit.dist = 9999; + hit.dist = BVH_RAYCAST_DIST_MAX; nearest.index = -1; nearest.dist_sq = brush_radius * brush_radius; /* find_nearest uses squared distance */ @@ -3304,7 +3304,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface, * point is at least surrounded by two brush faces */ negate_v3(ray_dir); hit.index = -1; - hit.dist = 9999; + hit.dist = BVH_RAYCAST_DIST_MAX; BLI_bvhtree_ray_cast(treeData.tree, ray_start, ray_dir, 0.0f, &hit, mesh_tris_spherecast_dp, &treeData); |