Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2012-07-02 17:41:51 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2012-07-02 17:41:51 +0400
commita0c6371b7f526905bb06e6f099f8b6f8bb743c01 (patch)
tree4ab12e82785a7ed6e5f0ae3b29148eff7862fd5a /intern
parent9f7af5ef7e1d76153510d657dcc2c3bde0811fd0 (diff)
Smoke Bugfix: Turbulence was removed.
Diffstat (limited to 'intern')
-rw-r--r--intern/smoke/intern/FLUID_3D.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp
index 99d3fc4b566..e006132ea8f 100644
--- a/intern/smoke/intern/FLUID_3D.cpp
+++ b/intern/smoke/intern/FLUID_3D.cpp
@@ -1298,7 +1298,7 @@ void FLUID_3D::addVorticity(int zBegin, int zEnd)
N[2] = (_vorticity[out] - _vorticity[in]) * dz;
float magnitude = sqrtf(N[0] * N[0] + N[1] * N[1] + N[2] * N[2]);
- if (magnitude > 0.0f)
+ if (magnitude > FLT_EPSILON)
{
magnitude = 1.0f / magnitude;
N[0] *= magnitude;
@@ -1306,8 +1306,8 @@ void FLUID_3D::addVorticity(int zBegin, int zEnd)
N[2] *= magnitude;
_xForce[index] += (N[1] * _zVorticity[vIndex] - N[2] * _yVorticity[vIndex]) * _dx * eps;
- _yForce[index] += (N[0] * _zVorticity[vIndex] - N[2] * _xVorticity[vIndex]) * _dx * eps;
- _zForce[index] -= (N[0] * _yVorticity[vIndex] - N[1] * _xVorticity[vIndex]) * _dx * eps;
+ _yForce[index] += (N[2] * _xVorticity[vIndex] - N[0] * _zVorticity[vIndex]) * _dx * eps;
+ _zForce[index] += (N[0] * _yVorticity[vIndex] - N[1] * _xVorticity[vIndex]) * _dx * eps;
}
} // if
vIndex++;