History

cleaned up some magic numbers

Jeffrey Ventrella committed 13 years ago

Commit 5e2dcfe1 parent aee29a04 files · +61 −47Browse files

Showing the changes to interface/src/ParticleSystem.h (1 of 4 files). Show all

Unified · Split

interface/src/ParticleSystem.h+16−4
@@ -10,9 +10,8 @@ · 9 unmodified lines
1010
1111 #include <glm/gtc/quaternion.hpp>
1212
13−const int MAX_PARTICLES = 5000;
14−const int MAX_EMITTERS = 100;
15−const int NUM_PARTICLE_LIFE_STAGES = 4; // each equal time-division of the particle's life can have different attributes
13+const int MAX_PARTICLES = 5000;
14+const int MAX_EMITTERS = 100;
1615
1716 enum ParticleRenderStyle
1817 {
@@ -22,6 +21,19 @@ enum ParticleRenderStyle · 3 unmodified lines
2221 NUM_PARTICLE_RENDER_STYLES
2322 };
2423
24+
25+enum ParticleLifeStage
26+{
27+ PARTICLE_LIFESTAGE_0 = 0,
28+ PARTICLE_LIFESTAGE_1,
29+ PARTICLE_LIFESTAGE_2,
30+ PARTICLE_LIFESTAGE_3,
31+ NUM_PARTICLE_LIFE_STAGES
32+};
33+
34+
35+
36+
2537 class ParticleSystem {
2638 public:
2739
@@ -51,7 +63,7 @@ public: · 23 unmodified lines
5163
5264 void setUpDirection(glm::vec3 upDirection) {_upDirection = upDirection;} // tell particle system which direction is up
5365 void setParticleAttributes (int emitterIndex, ParticleAttributes attributes); // set attributes for whole life of particles
54− void setParticleAttributes (int emitterIndex, int lifeStage, ParticleAttributes attributes); // set attributes for this life stage of particles
66+ void setParticleAttributes (int emitterIndex, ParticleLifeStage lifeStage, ParticleAttributes attributes); // set attributes for this life stage
5567 void setEmitterPosition (int emitterIndex, glm::vec3 position ) {_emitter[emitterIndex].position = position; }
5668 void setEmitterParticleResolution (int emitterIndex, int resolution ) {_emitter[emitterIndex].particleResolution = resolution; }
5769 void setEmitterDirection (int emitterIndex, glm::vec3 direction ) {_emitter[emitterIndex].direction = direction; }