summaryrefslogtreecommitdiff
path: root/particles.h
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2010-08-18 14:38:34 +0000
committerIan C <ianc@noddybox.co.uk>2010-08-18 14:38:34 +0000
commit19bbd5822593c7198dd54eb0f5d38fa1ed8d8fb7 (patch)
tree97f7f8849c3a8282ba571a64ff2a655cdf5d41aa /particles.h
parent0d2f672482fee91a9642a7cb6eb01fcdded79159 (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 'particles.h')
-rw-r--r--particles.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/particles.h b/particles.h
index 2619fb1..226dbf2 100644
--- a/particles.h
+++ b/particles.h
@@ -31,31 +31,31 @@
#include <list>
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<Point> m_list;
- GLfloat m_alpha_dec;
- GLfloat m_alpha_min;
+ GLfloat r,g,b,a;
+ GLfloat x1,y1,z1;
+ GLfloat x2,y2,z2;
};
+ list<Point> m_list;
+ GLfloat m_alpha_dec;
+ GLfloat m_alpha_min;
+};
+
#endif
// END OF FILE //