Bugfix (missed one code line): Copy paste induced bug found by Sv. Lockal.

Thank you for pointing this out!
This commit is contained in:
Daniel Genrich
2012-02-19 21:15:12 +00:00
parent 49b1d14aee
commit be674afdad

View File

@@ -1152,7 +1152,7 @@ void FLUID_3D::addVorticity(int zBegin, int zEnd)
float dz = (out == vIndex || in == vIndex) ? 1.0f / _dx : gridSize;
int right = _obstacles[index + 1] ? vIndex : vIndex + 1;
int left = _obstacles[index - 1] ? vIndex : vIndex - 1;
float dx = (right == vIndex || right == vIndex) ? 1.0f / _dx : gridSize;
float dx = (right == vIndex || left == vIndex) ? 1.0f / _dx : gridSize;
N[0] = (_vorticity[right] - _vorticity[left]) * dx;
N[1] = (_vorticity[up] - _vorticity[down]) * dy;
N[2] = (_vorticity[out] - _vorticity[in]) * dz;