Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / intern / smoke / intern / WTURBULENCE.h
index 0aa978e..d4e6b0c 100644 (file)
@@ -49,10 +49,10 @@ class WTURBULENCE
                void stepTurbulenceFull(float dt, float* xvel, float* yvel, float* zvel, unsigned char *obstacles);
        
                // texcoord functions
-               void advectTextureCoordinates(float dtOrg, float* xvel, float* yvel, float* zvel, float *tempBig1, float *tempBig2);
-               void resetTextureCoordinates(float *_eigMin, float *_eigMax);
+               void advectTextureCoordinates(float dtOrg, float* xvel, float* yvel, float* zvel);
+               void resetTextureCoordinates();
 
-               void computeEnergy(float *energy, float* xvel, float* yvel, float* zvel, unsigned char *obstacles);
+               void computeEnergy(float* xvel, float* yvel, float* zvel, unsigned char *obstacles);
 
                // evaluate wavelet noise function
                Vec3 WVelocity(Vec3 p);
@@ -63,6 +63,8 @@ class WTURBULENCE
                inline float* getArrayTcU() { return _tcU; }
                inline float* getArrayTcV() { return _tcV; }
                inline float* getArrayTcW() { return _tcW; }
+               inline float* getArrayEigMin() { return _eigMin; }
+               inline float* getArrayEigMax() { return _eigMax; }
 
                inline Vec3Int getResSm() { return _resSm; } // small resolution
                inline Vec3Int getResBig() { return _resBig; }
@@ -71,7 +73,7 @@ class WTURBULENCE
                // is accessed on through rna gui
                float *_strength;
 
-       // protected:
+       protected:
                // enlargement factor from original velocity field / simulation
                // _Big = _amplify * _Sm
                int _amplify;
@@ -79,15 +81,15 @@ class WTURBULENCE
                
                // noise settings
                float _cullingThreshold;
-               // float _noiseStrength;
-               // float _noiseSizeScale;
-               // bool _uvwAdvection;
-               // bool _uvwReset;
-               // float _noiseTimeanimSpeed;
-               // int _dumpInterval;
-               // nt _noiseControlType;
+               float _noiseStrength;
+               float _noiseSizeScale;
+               bool _uvwAdvection;
+               bool _uvwReset;
+               float _noiseTimeanimSpeed;
+               int _dumpInterval;
+               int _noiseControlType;
                // debug, scale density for projections output images
-               // float _outputScale;
+               float _outputScale;
 
                // noise resolution
                int _xResBig;
@@ -109,21 +111,39 @@ class WTURBULENCE
                float* _densityBig;
                float* _densityBigOld;
 
+               // big velocity macCormack fields
+               float* _bigUx;
+               float* _bigUy;
+               float* _bigUz;
+               // temp arrays for BFECC and MacCormack - they have more convenient
+               // names in the actual implementations
+               float* _tempBig1;
+               float* _tempBig2;
+
                // texture coordinates for noise
                float* _tcU;
                float* _tcV;
                float* _tcW;
                float* _tcTemp;
 
+               float* _eigMin;
+               float* _eigMax;
+
+               // wavelet decomposition of velocity energies
+               float* _energy;
+
                // noise data
                float* _noiseTile;
                //float* _noiseTileExt;
 
                // step counter
                int _totalStepsBig;
+
+               // highest frequency component of wavelet decomposition
+               float* _highFreqEnergy;
                
-               void computeEigenvalues(float *_eigMin, float *_eigMax);
-               void decomposeEnergy(float *energy, float *_highFreqEnergy);
+               void computeEigenvalues();
+               void decomposeEnergy();
 };
 
 #endif // WTURBULENCE_H