diff options
author | Ian C <ianc@noddybox.co.uk> | 2010-08-18 14:38:34 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2010-08-18 14:38:34 +0000 |
commit | 19bbd5822593c7198dd54eb0f5d38fa1ed8d8fb7 (patch) | |
tree | 97f7f8849c3a8282ba571a64ff2a655cdf5d41aa /sparks.h | |
parent | 0d2f672482fee91a9642a7cb6eb01fcdded79159 (diff) |
Reformatted code and altered the attraction rule to something a bit more
correct. Also added two tests to prove it works.
Diffstat (limited to 'sparks.h')
-rw-r--r-- | sparks.h | 50 |
1 files changed, 25 insertions, 25 deletions
@@ -31,37 +31,37 @@ #include <list> class Sparks - { - public: - Sparks(int num, GLfloat alpha_dec, GLfloat alpha_min, - int len, GLfloat delta); - virtual ~Sparks(); +{ +public: + Sparks(int num, GLfloat alpha_dec, GLfloat alpha_min, + int len, GLfloat delta); + virtual ~Sparks(); - void add(GLfloat ox, GLfloat oy, GLfloat oz); + void add(GLfloat ox, GLfloat oy, GLfloat oz); - void draw(); + void draw(); - void update(); + void update(); - private: - struct Point - { - GLfloat x1,y1,z1; - GLfloat x2,y2,z2; - GLfloat dx,dy,dz; - GLfloat alpha; - int life; - }; +private: + struct Point + { + GLfloat x1,y1,z1; + GLfloat x2,y2,z2; + GLfloat dx,dy,dz; + GLfloat alpha; + int life; + }; - list<Point> m_list; + list<Point> m_list; - int m_num; - GLfloat m_alpha_min; - GLfloat m_alpha_dec; - int m_life; - int m_len; - GLfloat m_delta; - }; + int m_num; + GLfloat m_alpha_min; + GLfloat m_alpha_dec; + int m_life; + int m_len; + GLfloat m_delta; +}; #endif |