mantaflow  0.10
A framework for fluid simulation
particlepainter.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  * Painting particle systems
12  *
13  ******************************************************************************/
14 
15 #ifndef _PARTICLEPAINTER_H_
16 #define _PARTICLEPAINTER_H_
17 
18 #include "painter.h"
19 #include "particle.h"
20 
21 namespace Manta {
22 
25  Q_OBJECT
26 public:
27  ParticlePainter(GridPainter<int>* gridRef, QWidget* par = 0);
28  ~ParticlePainter();
29 
30  void paint();
31  void attachWidget(QLayout* layout);
32 
33  enum PaintModes { PaintOff=0, PaintVel=1, PaintPos=2 };
34 
35 protected:
36  std::string getID();
37  Real getScale();
38  void update();
39  void updateText();
40  void processKeyEvent(PainterEvent e, int param);
41 
42  GridPainter<int>* mGridRef;
43  ParticleBase* mLocal;
44  QLabel* mInfo;
45 
47  int mMode;
50 
51  int mLastPdata;
52  bool mHavePdata;
53  Real mMaxVal;
54  std::string mPdataInfo;
55  std::map<PbClass*, Real> mValScale;
56 
57  void paintBasicSys();
58 };
59 
60 } // namespace
61 
62 #endif
63 
64 
Definition: commonkernels.h:22
int mDisplayMode
for BasicParticleSystem , change the way data channels are displayed
Definition: particlepainter.h:49
Base clas for all painters that require access to a locked PbClass.
Definition: painter.h:61
int mMode
for standard particle systems, this is used to select the data channel (display is changed with displ...
Definition: particlepainter.h:47
Definition: particle.h:32
Painter object for Particle Systems.
Definition: particlepainter.h:24