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
This commit is contained in:
Jens Ole Wund 2006-10-30 22:47:41 +00:00
parent e8a58eb0f9
commit 52c20fecba

@ -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 */