qvolray

view src/demo.h @ 37:450d4c50470f

- 16bit floating point textures halve gpu texture memory usage - slower transfer function change
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 01 Jan 2014 00:23:57 +0200
parents 3d05c261a2f4
children
line source
1 #ifndef DEMO_H_
2 #define DEMO_H_
4 #include <QObject>
5 #include <QTimer>
6 #include <vmath/vmath.h>
8 class Volume;
10 #define MB_PATH_SZ 5
12 struct MetaBall {
13 float energy;
14 Vector3 pos;
16 Vector3 path[MB_PATH_SZ];
17 };
19 class Demo : public QObject {
20 private:
21 Q_OBJECT
23 Volume *vol;
24 unsigned int sdr_mballs;
25 unsigned int fbo;
27 QTimer *timer;
28 MetaBall *balls;
29 int num_balls;
31 unsigned long tmsec;
33 private slots:
34 void timer_func();
36 public:
37 Demo();
38 ~Demo();
40 bool init();
41 void draw() const;
42 };
45 #endif // DEMO_H_