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).
This commit is contained in:
2016-01-12 09:37:56 +01:00
parent 90250f8568
commit c6c223ade6
15 changed files with 32 additions and 25 deletions

View File

@@ -299,7 +299,7 @@ static bool cast_ray_highpoly(
hits[i].index = -1;
/* TODO: we should use FLT_MAX here, but sweepsphere code isn't prepared for that */
hits[i].dist = 10000.0f;
hits[i].dist = BVH_RAYCAST_DIST_MAX;
/* transform the ray from the world space to the highpoly space */
mul_v3_m4v3(co_high, highpoly[i].imat, co);