Change !BLI_ghashIterator_isDone to BLI_ghashIterator_notDone. It is
[blender.git] / source / blender / blenkernel / intern / softbody.c
index bb0cfe1a5c6d2eac4227471beccbdb2876669c49..01d4696de94dcbd4b81faec4decafe407b501534 100644 (file)
@@ -1034,7 +1034,7 @@ static int sb_detect_aabb_collisionCached(float UNUSED(force[3]), unsigned int U
 
        hash  = vertexowner->soft->scratch->colliderhash;
        ihash = BLI_ghashIterator_new(hash);
-       while (!BLI_ghashIterator_isDone(ihash) ) {
+       while (BLI_ghashIterator_notDone(ihash) ) {
 
                ccd_Mesh *ccdm = BLI_ghashIterator_getValue     (ihash);
                ob             = BLI_ghashIterator_getKey       (ihash);
@@ -1097,12 +1097,12 @@ static int sb_detect_face_pointCached(float face_v1[3], float face_v2[3], float
        float facedist, outerfacethickness, tune = 10.f;
        int a, deflected=0;
 
-       aabbmin[0] = MIN3(face_v1[0], face_v2[0], face_v3[0]);
-       aabbmin[1] = MIN3(face_v1[1], face_v2[1], face_v3[1]);
-       aabbmin[2] = MIN3(face_v1[2], face_v2[2], face_v3[2]);
-       aabbmax[0] = MAX3(face_v1[0], face_v2[0], face_v3[0]);
-       aabbmax[1] = MAX3(face_v1[1], face_v2[1], face_v3[1]);
-       aabbmax[2] = MAX3(face_v1[2], face_v2[2], face_v3[2]);
+       aabbmin[0] = min_fff(face_v1[0], face_v2[0], face_v3[0]);
+       aabbmin[1] = min_fff(face_v1[1], face_v2[1], face_v3[1]);
+       aabbmin[2] = min_fff(face_v1[2], face_v2[2], face_v3[2]);
+       aabbmax[0] = max_fff(face_v1[0], face_v2[0], face_v3[0]);
+       aabbmax[1] = max_fff(face_v1[1], face_v2[1], face_v3[1]);
+       aabbmax[2] = max_fff(face_v1[2], face_v2[2], face_v3[2]);
 
        /* calculate face normal once again SIGH */
        sub_v3_v3v3(edge1, face_v1, face_v2);
@@ -1113,7 +1113,7 @@ static int sb_detect_face_pointCached(float face_v1[3], float face_v2[3], float
 
        hash  = vertexowner->soft->scratch->colliderhash;
        ihash = BLI_ghashIterator_new(hash);
-       while (!BLI_ghashIterator_isDone(ihash) ) {
+       while (BLI_ghashIterator_notDone(ihash) ) {
 
                ccd_Mesh *ccdm = BLI_ghashIterator_getValue     (ihash);
                ob             = BLI_ghashIterator_getKey       (ihash);
@@ -1196,16 +1196,16 @@ static int sb_detect_face_collisionCached(float face_v1[3], float face_v2[3], fl
        float t, tune = 10.0f;
        int a, deflected=0;
 
-       aabbmin[0] = MIN3(face_v1[0], face_v2[0], face_v3[0]);
-       aabbmin[1] = MIN3(face_v1[1], face_v2[1], face_v3[1]);
-       aabbmin[2] = MIN3(face_v1[2], face_v2[2], face_v3[2]);
-       aabbmax[0] = MAX3(face_v1[0], face_v2[0], face_v3[0]);
-       aabbmax[1] = MAX3(face_v1[1], face_v2[1], face_v3[1]);
-       aabbmax[2] = MAX3(face_v1[2], face_v2[2], face_v3[2]);
+       aabbmin[0] = min_fff(face_v1[0], face_v2[0], face_v3[0]);
+       aabbmin[1] = min_fff(face_v1[1], face_v2[1], face_v3[1]);
+       aabbmin[2] = min_fff(face_v1[2], face_v2[2], face_v3[2]);
+       aabbmax[0] = max_fff(face_v1[0], face_v2[0], face_v3[0]);
+       aabbmax[1] = max_fff(face_v1[1], face_v2[1], face_v3[1]);
+       aabbmax[2] = max_fff(face_v1[2], face_v2[2], face_v3[2]);
 
        hash  = vertexowner->soft->scratch->colliderhash;
        ihash = BLI_ghashIterator_new(hash);
-       while (!BLI_ghashIterator_isDone(ihash) ) {
+       while (BLI_ghashIterator_notDone(ihash) ) {
 
                ccd_Mesh *ccdm = BLI_ghashIterator_getValue     (ihash);
                ob             = BLI_ghashIterator_getKey       (ihash);
@@ -1433,7 +1433,7 @@ static int sb_detect_edge_collisionCached(float edge_v1[3], float edge_v2[3], fl
 
        hash  = vertexowner->soft->scratch->colliderhash;
        ihash = BLI_ghashIterator_new(hash);
-       while (!BLI_ghashIterator_isDone(ihash) ) {
+       while (BLI_ghashIterator_notDone(ihash) ) {
 
                ccd_Mesh *ccdm = BLI_ghashIterator_getValue     (ihash);
                ob             = BLI_ghashIterator_getKey       (ihash);
@@ -1763,7 +1763,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
        outerforceaccu[0]=outerforceaccu[1]=outerforceaccu[2]=0.0f;
        innerforceaccu[0]=innerforceaccu[1]=innerforceaccu[2]=0.0f;
 /* go */
-       while (!BLI_ghashIterator_isDone(ihash) ) {
+       while (BLI_ghashIterator_notDone(ihash) ) {
 
                ccd_Mesh *ccdm = BLI_ghashIterator_getValue     (ihash);
                ob             = BLI_ghashIterator_getKey       (ihash);
@@ -1957,7 +1957,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
                                                        }
 
                                                        closest_to_line_segment_v3(ve, opco, nv2, nv3);
-                                                        sub_v3_v3v3(ve, opco, ve);
+                                                       sub_v3_v3v3(ve, opco, ve);
                                                        dist = normalize_v3(ve);
                                                        if ((dist < outerfacethickness)&&(dist < mindistedge )) {
                                                                copy_v3_v3(coledge, ve);
@@ -1966,7 +1966,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
                                                        }
 
                                                        closest_to_line_segment_v3(ve, opco, nv3, nv1);
-                                                        sub_v3_v3v3(ve, opco, ve);
+                                                       sub_v3_v3v3(ve, opco, ve);
                                                        dist = normalize_v3(ve);
                                                        if ((dist < outerfacethickness)&&(dist < mindistedge )) {
                                                                copy_v3_v3(coledge, ve);
@@ -4108,18 +4108,6 @@ void sbObjectStep(Scene *scene, Object *ob, float cfra, float (*vertexCos)[3], i
                softbody_reset(ob, sb, vertexCos, numVerts);
        }
 
-       /* continue physics special case */
-       if (BKE_ptcache_get_continue_physics()) {
-               BKE_ptcache_invalidate(cache);
-               /* do simulation */
-               dtime = timescale;
-               softbody_update_positions(ob, sb, vertexCos, numVerts);
-               softbody_step(scene, ob, sb, dtime);
-               softbody_to_object(ob, vertexCos, numVerts, 0);
-               sb->last_frame = framenr;
-               return;
-       }
-
        /* still no points? go away */
        if (sb->totpoint==0) {
                return;