[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23458] trunk/blender/intern/smoke/intern/ FLUID_3D_STATIC.cpp: fixed some indentation, and removed
Kent Mein
mein at cs.umn.edu
Thu Sep 24 18:18:18 CEST 2009
Revision: 23458
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23458
Author: sirdude
Date: 2009-09-24 18:18:17 +0200 (Thu, 24 Sep 2009)
Log Message:
-----------
fixed some indentation, and removed
declaration of index in a couple of places because it was
already defined and safe to use the old def.
Kent
Modified Paths:
--------------
trunk/blender/intern/smoke/intern/FLUID_3D_STATIC.cpp
Modified: trunk/blender/intern/smoke/intern/FLUID_3D_STATIC.cpp
===================================================================
--- trunk/blender/intern/smoke/intern/FLUID_3D_STATIC.cpp 2009-09-24 15:36:00 UTC (rev 23457)
+++ trunk/blender/intern/smoke/intern/FLUID_3D_STATIC.cpp 2009-09-24 16:18:17 UTC (rev 23458)
@@ -54,23 +54,21 @@
float yTotal = dx * res[1];
float zTotal = dx * res[2];
- float heighMin = 0.05;
- float heighMax = 0.10;
+ float heighMin = 0.05;
+ float heighMax = 0.10;
- for (int y = 0; y < res[2]; y++)
- for (int z = (int)(heighMin*res[2]); z <= (int)(heighMax * res[2]); z++)
- for (int x = 0; x < res[0]; x++)
- {
- float xLength = x * dx - xTotal * 0.4f;
- float yLength = y * dx - yTotal * 0.5f;
- float radius = sqrtf(xLength * xLength + yLength * yLength);
+ for (int y = 0; y < res[2]; y++)
+ for (int z = (int)(heighMin*res[2]); z <= (int)(heighMax * res[2]); z++)
+ for (int x = 0; x < res[0]; x++) {
+ float xLength = x * dx - xTotal * 0.4f;
+ float yLength = y * dx - yTotal * 0.5f;
+ float radius = sqrtf(xLength * xLength + yLength * yLength);
- if (radius < 0.075f * xTotal)
- {
- int index = x + y * res[0] + z * slabSize;
- field[index] = 1.0f;
- }
- }
+ if (radius < 0.075f * xTotal) {
+ int index = x + y * res[0] + z * slabSize;
+ field[index] = 1.0f;
+ }
+ }
}
@@ -98,7 +96,7 @@
for (int z = 0; z < res[2]; z++)
{
// top slab
- int index = y * res[0] + z * slabSize;
+ index = y * res[0] + z * slabSize;
index += res[0] - 1;
if(field[index]<0.) field[index] = 0.;
index -= 1;
@@ -130,7 +128,7 @@
for (int x = 0; x < res[0]; x++)
{
// top slab
- int index = x + z * slabSize;
+ index = x + z * slabSize;
index += slabSize - res[0];
if(field[index]<0.) field[index] = 0.;
index -= res[0];
@@ -164,7 +162,7 @@
for (int x = 0; x < res[0]; x++)
{
// top slab
- int index = x + y * res[0];
+ index = x + y * res[0];
index += totalCells - slabSize;
if(field[index]<0.) field[index] = 0.;
index -= slabSize;
More information about the Bf-blender-cvs
mailing list