mantaflow  0.10
A framework for fluid simulation
meshpainter.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 mesh objects
12  *
13  ******************************************************************************/
14 
15 #ifndef _MESHPAINTER_H_
16 #define _MESHPAINTER_H_
17 
18 #include "painter.h"
19 
20 namespace Manta {
21 // fwd decl
22 class Mesh;
23 
25 class MeshPainter : public LockedObjPainter {
26  Q_OBJECT
27 public:
28  enum DisplayMode { ModeTrans=0, ModeLines, ModePoints, ModeFlatShade, ModeInvisible, Num_DisplayModes };
29  enum BackgroundMode { BModeNormal=0, BModeTrans, BModeInvisible, Num_BackgroundModes };
30  enum VorticityMode { VModeFull=0, VModeSmoothed, VModeDiff, VModeSmoke, VModeTex, VModeNone, Num_VorticityModes };
31 
32  MeshPainter(QWidget* par = 0);
33  ~MeshPainter();
34 
35  void paint();
36  void attachWidget(QLayout* layout);
37 
38 public slots:
39  void setBackgroundMesh(Mesh* bgr);
40 
41 protected:
42  std::string getID();
43  void update();
44  void updateText();
45  void processKeyEvent(PainterEvent e, int param);
46  void processSpecificKeyEvent(PainterEvent e, int param);
47  void setupLights(bool specular);
48 
49  Real mColorScale;
50  DisplayMode mMode;
51  VorticityMode mVorticityMode;
52  BackgroundMode mBackgroundMode;
53  Mesh* mLocalMesh, *mBackground;
54  QLabel* mInfo;
55  bool mHide;
56 };
57 
58 } // namespace
59 
60 #endif
61 
Definition: commonkernels.h:22
Base clas for all painters that require access to a locked PbClass.
Definition: painter.h:61
Triangle mesh class.
Definition: mesh.h:126
Painter object for Meshes.
Definition: meshpainter.h:25