diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-01-23 18:45:01 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-01-23 18:45:01 +0300 |
commit | 9feadd443a69484ec5b56af566d28758cc7ae119 (patch) | |
tree | 97355147e633ad439fb6d56f66b88413bc81dc1c /source/blender/blenlib/intern/BLI_kdopbvh.c | |
parent | 1bb6ba0605d56f5fcb3a190a350659dd2e4ae600 (diff) |
Small fixes for particles.
* Particle collision with size was broken since raytrace optimizations by jaguarandi, now the collision code falls back to old slower method when the collision ray has a radius.
* Single goal/avoid object now works for boids.
* Some tiny improvements on collision avoidance for boids.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_kdopbvh.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdopbvh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index eebff8dfaef..a91c24471bb 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -1502,7 +1502,8 @@ static void dfs_raycast(BVHRayCastData *data, BVHNode *node) //ray-bv is really fast.. and simple tests revealed its worth to test it //before calling the ray-primitive functions - float dist = fast_ray_nearest_hit(data, node); + /* XXX: temporary solution for particles untill fast_ray_nearest_hit supports ray.radius */ + float dist = (data->ray.radius > 0.0f) ? ray_nearest_hit(data, node->bv) : fast_ray_nearest_hit(data, node); if(dist >= data->hit.dist) return; if(node->totnode == 0) |