diff options
Diffstat (limited to 'intern/smoke/intern')
-rw-r--r-- | intern/smoke/intern/FLUID_3D.h | 4 | ||||
-rw-r--r-- | intern/smoke/intern/FLUID_3D_STATIC.cpp | 52 | ||||
-rw-r--r-- | intern/smoke/intern/WTURBULENCE.h | 2 |
3 files changed, 31 insertions, 27 deletions
diff --git a/intern/smoke/intern/FLUID_3D.h b/intern/smoke/intern/FLUID_3D.h index 8cadf3bc989..d98a39930de 100644 --- a/intern/smoke/intern/FLUID_3D.h +++ b/intern/smoke/intern/FLUID_3D.h @@ -41,9 +41,9 @@ using namespace std; using namespace BasicVector; -class WTURBULENCE; +struct WTURBULENCE; -class FLUID_3D +struct FLUID_3D { public: FLUID_3D(int *res, float dx, float dtdef, int init_heat, int init_fire, int init_colors); diff --git a/intern/smoke/intern/FLUID_3D_STATIC.cpp b/intern/smoke/intern/FLUID_3D_STATIC.cpp index ac485ad983a..e0a31a9d0c1 100644 --- a/intern/smoke/intern/FLUID_3D_STATIC.cpp +++ b/intern/smoke/intern/FLUID_3D_STATIC.cpp @@ -200,13 +200,15 @@ void FLUID_3D::setZeroZ(float* field, Vec3Int res, int zBegin, int zEnd) const int totalCells = res[0] * res[1] * res[2]; int index = 0; - if ((zBegin == 0)) - for (int y = 0; y < res[1]; y++) - for (int x = 0; x < res[0]; x++, index++) - { - // front slab - field[index] = 0.0f; - } + if (zBegin == 0) + { + for (int y = 0; y < res[1]; y++) + for (int x = 0; x < res[0]; x++, index++) + { + // front slab + field[index] = 0.0f; + } + } if (zEnd == res[2]) { @@ -265,27 +267,29 @@ void FLUID_3D::copyBorderZ(float* field, Vec3Int res, int zBegin, int zEnd) const int totalCells = res[0] * res[1] * res[2]; int index=0; - if ((zBegin == 0)) - for (int y = 0; y < res[1]; y++) - for (int x = 0; x < res[0]; x++, index++) - { - field[index] = field[index + slabSize]; - } + if (zBegin == 0) + { + for (int y = 0; y < res[1]; y++) + for (int x = 0; x < res[0]; x++, index++) + { + field[index] = field[index + slabSize]; + } + } - if ((zEnd == res[2])) + if (zEnd == res[2]) { - index=0; - int indexx=0; - const int cellsslab = totalCells - slabSize; + index=0; + int indexx=0; + const int cellsslab = totalCells - slabSize; - for (int y = 0; y < res[1]; y++) - for (int x = 0; x < res[0]; x++, index++) - { - // back slab - indexx = index + cellsslab; - field[indexx] = field[indexx - slabSize]; - } + for (int y = 0; y < res[1]; y++) + for (int x = 0; x < res[0]; x++, index++) + { + // back slab + indexx = index + cellsslab; + field[indexx] = field[indexx - slabSize]; + } } } diff --git a/intern/smoke/intern/WTURBULENCE.h b/intern/smoke/intern/WTURBULENCE.h index 1655bd95d32..4e76466bde5 100644 --- a/intern/smoke/intern/WTURBULENCE.h +++ b/intern/smoke/intern/WTURBULENCE.h @@ -32,7 +32,7 @@ class SIMPLE_PARSER; /////////////////////////////////////////////////////////////////////////////// /// Main WTURBULENCE class, stores large density array etc. /////////////////////////////////////////////////////////////////////////////// -class WTURBULENCE +struct WTURBULENCE { public: // both config files can be NULL, altCfg might override values from noiseCfg |