mantaflow  0.10
A framework for fluid simulation
turbulencepart.h
Go to the documentation of this file.
1 
2 /******************************************************************************
3  *
4  * MantaFlow fluid solver framework
5  * Copyright 2011 Tobias Pfaff, Nils Thuerey
6  *
7  * This program is free software, distributed under the terms of the
8  * GNU General Public License (GPL)
9  * http://www.gnu.org/licenses
10  *
11  * Turbulence particles
12  *
13  ******************************************************************************/
14 
15 #ifndef _TURBULENCEPART_H_
16 #define _TURBULENCEPART_H_
17 
18 #include "particle.h"
19 #include "noisefield.h"
20 
21 namespace Manta {
22 class Shape;
23 
24 
25 
27  TurbulenceParticleData() : pos(0.0),color(1.),tex0(0.0),tex1(0.0),flag(0) {}
28  TurbulenceParticleData(const Vec3& p, const Vec3& color = Vec3(1.)) : pos(p),color(color),tex0(p),tex1(p),flag(0) {}
29  Vec3 pos, color;
30  Vec3 tex0, tex1;
31  int flag;
32  static ParticleBase::SystemType getType() { return ParticleBase::TURBULENCE; }
33 };
34 
37 PYTHON class TurbulenceParticleSystem : public ParticleSystem<TurbulenceParticleData> {
38 public:
39  PYTHON() TurbulenceParticleSystem(FluidSolver* parent, WaveletNoiseField& noise);
40 
41  PYTHON() void resetTexCoords(int num, const Vec3& inflow);
42  PYTHON() void seed(Shape* source, int num);
43  PYTHON() void synthesize(FlagGrid& flags, Grid<Real>& k, int octaves=2, Real switchLength=10.0, Real L0=0.1, Real scale=1.0, Vec3 inflowBias=0.0);
44  PYTHON() void deleteInObstacle(FlagGrid& flags);
45 
46  virtual ParticleBase* clone();
47 
48 private:
49  WaveletNoiseField& noise;
50 };
51 
52 } // namespace
53 
54 
55 #endif
56 
57 
Definition: commonkernels.h:22
Definition: grid.h:267
Definition: noisefield.h:28
Basic inlined vector class.
Definition: vectorbase.h:71
Main class for particle systems.
Definition: particle.h:100
Definition: particle.h:32
Definition: shapes.h:29
Definition: turbulencepart.h:26
Definition: turbulencepart.h:37
Definition: fluidsolver.h:28