Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Ole Wund <bjornmose@gmx.net>2006-10-31 01:47:41 +0300
committerJens Ole Wund <bjornmose@gmx.net>2006-10-31 01:47:41 +0300
commit52c20fecba07fecb4964d1ef310eb944bccd68ea (patch)
tree3a682d5bebc1c2aa6f808baf943f58bbe69c188b /source/blender/blenkernel/intern/softbody.c
parente8a58eb0f9731600fde13898ec5d329258801a64 (diff)
softbody update -> self collision search takes 1/3 of the time here
this one should work nice --> http://www.wund.homepage.t-online.de/hidden/sb_col_must_3_0.blend
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r--source/blender/blenkernel/intern/softbody.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index c015f0f5a67..b3bdca3216c 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -1269,6 +1269,8 @@ static void softbody_calc_forces(Object *ob, float forcetime)
if (c < a ) continue; /* exploit force(a,b) == -force(b,a) part1/2 */
compare = (obp->colball + bp->colball);
VecSubf(def, bp->pos, obp->pos);
+ /* booster */
+ if ( (ABS(def[0]) > compare) || (ABS(def[1]) > compare) || (ABS(def[2]) > compare) ) continue;
distance = Normalise(def);
if (distance < compare ){
/* exclude body points attached with a spring */