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
2222 };
2323
2424
25+enum 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+
2534 enum ParticleLifeStage
2635 {
2736 PARTICLE_LIFESTAGE_0 = 0,
@@ -54,6 +63,9 @@ public: · 26 unmodified lines
5463 bool usingCollisionPlane; // set to true to allow collision with a plane
5564 glm::vec3 collisionPlanePosition; // reference position of the collision plane
5665 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
5769 };
5870
5971 // public methods...
@@ -65,6 +77,7 @@ public: · 5 unmodified lines
6577 void render();
6678
6779 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
6881 void setParticleAttributes (int emitterIndex, ParticleAttributes attributes); // set attributes for whole life of particles
6982 void setParticleAttributes (int emitterIndex, ParticleLifeStage lifeStage, ParticleAttributes attributes); // set attributes for this life stage
7083 void setEmitterPosition (int emitterIndex, glm::vec3 position ) {_emitter[emitterIndex].position = position; }
@@ -110,6 +123,7 @@ private: · 39 unmodified lines
110123 Particle _particle[MAX_PARTICLES];
111124 int _numParticles;
112125 int _numEmitters;
126+ float _timer;
113127
114128 // private methods
115129 void updateParticle(int index, float deltaTime);