qvolray
annotate 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 |
rev | line source |
---|---|
nuclear@18 | 1 #ifndef DEMO_H_ |
nuclear@18 | 2 #define DEMO_H_ |
nuclear@18 | 3 |
nuclear@36 | 4 #include <QObject> |
nuclear@36 | 5 #include <QTimer> |
nuclear@36 | 6 #include <vmath/vmath.h> |
nuclear@36 | 7 |
nuclear@36 | 8 class Volume; |
nuclear@36 | 9 |
nuclear@36 | 10 #define MB_PATH_SZ 5 |
nuclear@36 | 11 |
nuclear@36 | 12 struct MetaBall { |
nuclear@36 | 13 float energy; |
nuclear@36 | 14 Vector3 pos; |
nuclear@36 | 15 |
nuclear@36 | 16 Vector3 path[MB_PATH_SZ]; |
nuclear@36 | 17 }; |
nuclear@36 | 18 |
nuclear@36 | 19 class Demo : public QObject { |
nuclear@36 | 20 private: |
nuclear@36 | 21 Q_OBJECT |
nuclear@36 | 22 |
nuclear@36 | 23 Volume *vol; |
nuclear@36 | 24 unsigned int sdr_mballs; |
nuclear@36 | 25 unsigned int fbo; |
nuclear@36 | 26 |
nuclear@36 | 27 QTimer *timer; |
nuclear@36 | 28 MetaBall *balls; |
nuclear@36 | 29 int num_balls; |
nuclear@36 | 30 |
nuclear@36 | 31 unsigned long tmsec; |
nuclear@36 | 32 |
nuclear@36 | 33 private slots: |
nuclear@36 | 34 void timer_func(); |
nuclear@36 | 35 |
nuclear@36 | 36 public: |
nuclear@36 | 37 Demo(); |
nuclear@36 | 38 ~Demo(); |
nuclear@36 | 39 |
nuclear@36 | 40 bool init(); |
nuclear@36 | 41 void draw() const; |
nuclear@36 | 42 }; |
nuclear@18 | 43 |
nuclear@18 | 44 |
nuclear@18 | 45 #endif // DEMO_H_ |