qvolray
diff src/demo.h @ 36:70b937008134
demo :)
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 15 Apr 2012 07:19:01 +0300 |
parents | 3d05c261a2f4 |
children |
line diff
1.1 --- a/src/demo.h Sun Apr 15 02:22:13 2012 +0300 1.2 +++ b/src/demo.h Sun Apr 15 07:19:01 2012 +0300 1.3 @@ -1,8 +1,45 @@ 1.4 #ifndef DEMO_H_ 1.5 #define DEMO_H_ 1.6 1.7 -bool init_demo(); 1.8 -void draw_demo(); 1.9 +#include <QObject> 1.10 +#include <QTimer> 1.11 +#include <vmath/vmath.h> 1.12 + 1.13 +class Volume; 1.14 + 1.15 +#define MB_PATH_SZ 5 1.16 + 1.17 +struct MetaBall { 1.18 + float energy; 1.19 + Vector3 pos; 1.20 + 1.21 + Vector3 path[MB_PATH_SZ]; 1.22 +}; 1.23 + 1.24 +class Demo : public QObject { 1.25 +private: 1.26 + Q_OBJECT 1.27 + 1.28 + Volume *vol; 1.29 + unsigned int sdr_mballs; 1.30 + unsigned int fbo; 1.31 + 1.32 + QTimer *timer; 1.33 + MetaBall *balls; 1.34 + int num_balls; 1.35 + 1.36 + unsigned long tmsec; 1.37 + 1.38 +private slots: 1.39 + void timer_func(); 1.40 + 1.41 +public: 1.42 + Demo(); 1.43 + ~Demo(); 1.44 + 1.45 + bool init(); 1.46 + void draw() const; 1.47 +}; 1.48 1.49 1.50 #endif // DEMO_H_