From 19bbd5822593c7198dd54eb0f5d38fa1ed8d8fb7 Mon Sep 17 00:00:00 2001 From: Ian C Date: Wed, 18 Aug 2010 14:38:34 +0000 Subject: Reformatted code and altered the attraction rule to something a bit more correct. Also added two tests to prove it works. --- particles.h | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'particles.h') diff --git a/particles.h b/particles.h index 2619fb1..226dbf2 100644 --- a/particles.h +++ b/particles.h @@ -31,31 +31,31 @@ #include class Particles +{ +public: + Particles(GLfloat alpha_dec, GLfloat alpha_min); + virtual ~Particles(); + + void add(GLfloat x1, GLfloat y1, GLfloat z1, + GLfloat x2, GLfloat y2, GLfloat z2, + GLfloat r, GLfloat g, GLfloat b); + + void draw(); + void update(); + +private: + struct Point { - public: - Particles(GLfloat alpha_dec, GLfloat alpha_min); - virtual ~Particles(); - - void add(GLfloat x1, GLfloat y1, GLfloat z1, - GLfloat x2, GLfloat y2, GLfloat z2, - GLfloat r, GLfloat g, GLfloat b); - - void draw(); - void update(); - - private: - struct Point - { - GLfloat r,g,b,a; - GLfloat x1,y1,z1; - GLfloat x2,y2,z2; - }; - - list m_list; - GLfloat m_alpha_dec; - GLfloat m_alpha_min; + GLfloat r,g,b,a; + GLfloat x1,y1,z1; + GLfloat x2,y2,z2; }; + list m_list; + GLfloat m_alpha_dec; + GLfloat m_alpha_min; +}; + #endif // END OF FILE // -- cgit v1.2.3