-
Notifications
You must be signed in to change notification settings - Fork 2
/
emittercontroller.h
61 lines (46 loc) · 1.04 KB
/
emittercontroller.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef EMITTERCONTROLLER_H
#define EMITTERCONTROLLER_H
#include <QWidget>
#include "color.h"
#include "vector3d.h"
class Emitter;
class GLWidget;
namespace Ui {
class EmitterController;
}
class EmitterController : public QWidget {
Q_OBJECT
public:
enum emitter_type {
TYPE_SMOKE,
TYPE_FIRE,
TYPE_WATER,
TYPE_CUSTOM
};
explicit EmitterController(QWidget *parent = 0, GLWidget *glwidget = NULL);
virtual ~EmitterController();
void setType(emitter_type type);
public slots:
void setFrequency(double val);
void setPosX(double val);
void setPosY(double val);
void setPosZ(double val);
void setDirX(double val);
void setDirY(double val);
void setDirZ(double val);
void setColorR(int val);
void setColorG(int val);
void setColorB(int val);
private:
Ui::EmitterController *ui;
int _emitterIndex;
Emitter *_emitter;
GLWidget *_glwidget;
emitter_type _type;
float _frequency;
Color _color;
Vector3D _position;
Vector3D _direction;
void createEmitter();
};
#endif // EMITTERCONTROLLER_H