summaryrefslogtreecommitdiff
path: root/sparks.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 /sparks.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 'sparks.h')
-rw-r--r--sparks.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/sparks.h b/sparks.h
index 7c5deaf..63945b5 100644
--- a/sparks.h
+++ b/sparks.h
@@ -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