History

added color modulation

Jeffrey Ventrella committed 13 years ago

Commit 37ff8ae1 parent f83ee1e4 files · +340 −249Browse files

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

Unified · Split

interface/src/ParticleSystem.h+14−0
@@ -22,6 +22,15 @@ enum ParticleRenderStyle · 21 unmodified lines
22};22};
23 23
24 24
25enum ColorModulationStyle
26{
27 COLOR_MODULATION_STYLE_NULL = -1,
28 COLOR_MODULATION_STYLE_LIGHNTESS_PULSE,
29 COLOR_MODULATION_STYLE_LIGHTNESS_WAVE,
30 NUM_COLOR_MODULATION_STYLES
31};
32
33
25enum ParticleLifeStage34enum ParticleLifeStage
26{35{
27 PARTICLE_LIFESTAGE_0 = 0,36 PARTICLE_LIFESTAGE_0 = 0,
@@ -54,6 +63,9 @@ public: · 26 unmodified lines
54 bool usingCollisionPlane; // set to true to allow collision with a plane63 bool usingCollisionPlane; // set to true to allow collision with a plane
55 glm::vec3 collisionPlanePosition; // reference position of the collision plane64 glm::vec3 collisionPlanePosition; // reference position of the collision plane
56 glm::vec3 collisionPlaneNormal; // the surface normal of the collision plane65 glm::vec3 collisionPlaneNormal; // the surface normal of the collision plane
66 float modulationAmplitude; // sets the degree (from 0 to 1) of the modulating effect
67 float modulationRate; // the period of modulation, in seconds
68 ColorModulationStyle modulationStyle; // to choose between color modulation styles
57 }; 69 };
58 70
59 // public methods...71 // public methods...
@@ -65,6 +77,7 @@ public: · 5 unmodified lines
65 void render();77 void render();
66 78
67 void setUpDirection(glm::vec3 upDirection) {_upDirection = upDirection;} // tell particle system which direction is up79 void setUpDirection(glm::vec3 upDirection) {_upDirection = upDirection;} // tell particle system which direction is up
80 void setParticleAttributesToDefault(ParticleAttributes * attributes); // set these attributes to their default values
68 void setParticleAttributes (int emitterIndex, ParticleAttributes attributes); // set attributes for whole life of particles81 void setParticleAttributes (int emitterIndex, ParticleAttributes attributes); // set attributes for whole life of particles
69 void setParticleAttributes (int emitterIndex, ParticleLifeStage lifeStage, ParticleAttributes attributes); // set attributes for this life stage82 void setParticleAttributes (int emitterIndex, ParticleLifeStage lifeStage, ParticleAttributes attributes); // set attributes for this life stage
70 void setEmitterPosition (int emitterIndex, glm::vec3 position ) {_emitter[emitterIndex].position = position; } 83 void setEmitterPosition (int emitterIndex, glm::vec3 position ) {_emitter[emitterIndex].position = position; }
@@ -110,6 +123,7 @@ private: · 39 unmodified lines
110 Particle _particle[MAX_PARTICLES];123 Particle _particle[MAX_PARTICLES];
111 int _numParticles;124 int _numParticles;
112 int _numEmitters;125 int _numEmitters;
126 float _timer;
113 127
114 // private methods128 // private methods
115 void updateParticle(int index, float deltaTime);129 void updateParticle(int index, float deltaTime);