~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to intern/smoke/intern/FLUID_3D.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** \file smoke/intern/FLUID_3D.h
 
2
 *  \ingroup smoke
 
3
 */
1
4
//////////////////////////////////////////////////////////////////////
2
5
// This file is part of Wavelet Turbulence.
3
6
// 
30
33
 
31
34
#include <cstdlib>
32
35
#include <cmath>
 
36
#include <cstring>
33
37
#include <iostream>
34
38
#include "OBSTACLE.h"
35
39
// #include "WTURBULENCE.h"
36
40
#include "VEC3.h"
37
41
 
 
42
// timestep default value for nice appearance
 
43
#define DT_DEFAULT 0.1f;
 
44
 
38
45
using namespace std;
39
46
using namespace BasicVector;
40
47
class WTURBULENCE;
42
49
class FLUID_3D  
43
50
{
44
51
        public:
45
 
                FLUID_3D(int *res, /* int amplify, */ float *p0, float dt);
 
52
                FLUID_3D(int *res, /* int amplify, */ float *p0);
46
53
                FLUID_3D() {};
47
54
                virtual ~FLUID_3D();
48
55
 
49
 
                void initBlenderRNA(float *alpha, float *beta);
 
56
                void initBlenderRNA(float *alpha, float *beta, float *dt_factor, float *vorticity, int *border_colli);
50
57
                
51
58
                // create & allocate vector noise advection 
52
59
                void initVectorNoise(int amplify);
54
61
                void addSmokeColumn();
55
62
                static void addSmokeTestCase(float* field, Vec3Int res);
56
63
 
57
 
                void step();
 
64
                void step(float dt);
58
65
                void addObstacle(OBSTACLE* obstacle);
59
66
 
60
67
                const float* xVelocity() { return _xVelocity; }; 
110
117
 
111
118
                // simulation constants
112
119
                float _dt;
 
120
                float *_dtFactor;
113
121
                float _vorticityEps;
114
122
                float _heatDiffusion;
 
123
                float *_vorticityRNA;   // RNA-pointer.
115
124
                float *_alpha; // for the buoyancy density term <-- as pointer to get blender RNA in here
116
125
                float *_beta; // was _buoyancy <-- as pointer to get blender RNA in here
117
126
                float _tempAmb; /* ambient temperature */
 
127
                float _constantScaling;
 
128
 
 
129
                bool _domainBcFront;  // z
 
130
                bool _domainBcTop;    // y
 
131
                bool _domainBcLeft;   // x
 
132
                bool _domainBcBack;   // DOMAIN_BC_FRONT
 
133
                bool _domainBcBottom; // DOMAIN_BC_TOP
 
134
                bool _domainBcRight;  // DOMAIN_BC_LEFT
 
135
                int *_borderColli; // border collision rules <-- as pointer to get blender RNA in here
 
136
                int _colloPrev;         // To track whether value has been changed (to not
 
137
                                                        // have to recalibrate borders if nothing has changed
 
138
                void setBorderCollisions();
118
139
 
119
140
                // WTURBULENCE object, if active
120
141
                // WTURBULENCE* _wTurbulence;