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/blenlib/BLI_kdopbvh.h | |
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/blenlib/BLI_kdopbvh.h')
-rw-r--r-- | source/blender/blenlib/BLI_kdopbvh.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h index 0c359c7f090..d91992fff99 100644 --- a/source/blender/blenlib/BLI_kdopbvh.h +++ b/source/blender/blenlib/BLI_kdopbvh.h @@ -77,6 +77,7 @@ enum { BVH_RAYCAST_WATERTIGHT = (1 << 0), }; #define BVH_RAYCAST_DEFAULT (BVH_RAYCAST_WATERTIGHT) +#define BVH_RAYCAST_DIST_MAX (FLT_MAX / 2.0f) /* callback must update nearest in case it finds a nearest result */ typedef void (*BVHTree_NearestPointCallback)(void *userdata, int index, const float co[3], BVHTreeNearest *nearest); |