Revision: 47923
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47923
Author:   genscher
Date:     2012-06-14 21:56:45 +0000 (Thu, 14 Jun 2012)
Log Message:
-----------
- Remove unused code
- Set density to zero in obstacle cells

Modified Paths:
--------------
    branches/smoke2/source/blender/blenkernel/intern/smoke.c

Modified: branches/smoke2/source/blender/blenkernel/intern/smoke.c
===================================================================
--- branches/smoke2/source/blender/blenkernel/intern/smoke.c    2012-06-14 
21:52:40 UTC (rev 47922)
+++ branches/smoke2/source/blender/blenkernel/intern/smoke.c    2012-06-14 
21:56:45 UTC (rev 47923)
@@ -640,7 +640,6 @@
                BVHTreeFromMesh treeData = {0};
                int numverts, i, z;
                int *res = sds->res;
-               float *density = smoke_get_density(sds->fluid);
 
                float surface_distance = 0.6;
 
@@ -758,7 +757,6 @@
 
                                                /* tag obstacle cells */
                                                obstacle_map[index] = 1;
-                                               density[index] = 0.0f;
 
                                                if(has_velocity)
                                                        obstacle_map[index] |= 
8;
@@ -792,7 +790,7 @@
        float *velxOrig = smoke_get_velocity_x(sds->fluid);
        float *velyOrig = smoke_get_velocity_y(sds->fluid);
        float *velzOrig = smoke_get_velocity_z(sds->fluid);
-       // float *density = smoke_get_density(sds->fluid);
+       float *density = smoke_get_density(sds->fluid);
        unsigned int z;
 
        smoke_get_ob_velocity(sds->fluid, &velx, &vely, &velz);
@@ -800,17 +798,6 @@
        // TODO: delete old obstacle flags
        for(z = 0; z < sds->res[0] * sds->res[1] * sds->res[2]; z++)
        {
-#if 0
-               if(obstacles[z])
-               {
-                       // density[z] = 0;
-
-                       velxOrig[z] = 0;
-                       velyOrig[z] = 0;
-                       velzOrig[z] = 0;
-               }
-#endif
-
                if(obstacles[z] & 8) // Do not delete static obstacles
                {
                        obstacles[z] = 0;
@@ -850,6 +837,8 @@
                        velxOrig[z] = 0;
                        velyOrig[z] = 0;
                        velzOrig[z] = 0;
+
+                       density[z] = 0;
                }
        }
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to