History

cleanup

Jeffrey Ventrella committed 13 years ago

Commit df32c181 parent 4b07d653 files · +27 −17Browse files

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

Unified · Split

interface/src/ParticleSystem.h+4−7
@@ -21,7 +21,6 @@ enum ParticleRenderStyle · 20 unmodified lines
2121 NUM_PARTICLE_RENDER_STYLES
2222 };
2323
24−
2524 enum ColorModulationStyle
2625 {
2726 COLOR_MODULATION_STYLE_NULL = -1,
@@ -30,7 +29,6 @@ enum ColorModulationStyle · 2 unmodified lines
3029 NUM_COLOR_MODULATION_STYLES
3130 };
3231
33−
3432 enum ParticleLifeStage
3533 {
3634 PARTICLE_LIFESTAGE_0 = 0,
@@ -40,9 +38,6 @@ enum ParticleLifeStage · 3 unmodified lines
4038 NUM_PARTICLE_LIFE_STAGES
4139 };
4240
43−
44−
45−
4641 class ParticleSystem {
4742 public:
4843
@@ -80,7 +75,7 @@ public: · 31 unmodified lines
8075 void setParticleAttributesToDefault(ParticleAttributes * attributes); // set these attributes to their default values
8176 void setParticleAttributes (int emitterIndex, ParticleAttributes attributes); // set attributes for whole life of particles
8277 void setParticleAttributes (int emitterIndex, ParticleLifeStage lifeStage, ParticleAttributes attributes); // set attributes for this life stage
83− void setEmitterPosition (int emitterIndex, glm::vec3 position ) {_emitter[emitterIndex].position = position; }
78+ void setEmitterPosition (int emitterIndex, glm::vec3 position );
8479 void setEmitterParticleResolution (int emitterIndex, int resolution ) {_emitter[emitterIndex].particleResolution = resolution; }
8580 void setEmitterDirection (int emitterIndex, glm::vec3 direction ) {_emitter[emitterIndex].direction = direction; }
8681 void setShowingEmitter (int emitterIndex, bool showing ) {_emitter[emitterIndex].visible = showing; }
@@ -105,11 +100,13 @@ private: · 18 unmodified lines
105100
106101 struct Emitter {
107102 glm::vec3 position; // the position of the emitter in world coordinates
103+ glm::vec3 previousPosition; // the position of the emitter in the previous time step
108104 glm::vec3 direction; // a normalized vector used as an axis for particle emission and other effects
109105 bool visible; // whether or not a line is shown indicating the emitter (indicating its direction)
110106 float particleLifespan; // how long the particle shall live, in seconds
111107 int particleResolution; // for sphere-based particles
112108 float emitReserve; // baed on 'rate', this is the number of particles that need to be emitted at a given time step
109+ int numParticlesEmittedThisTime; //the integer number of particles to emit at the preent time step
113110 float thrust; // the initial velocity upon emitting along the emitter direction
114111 float rate; // currently, how many particles emitted during a simulation time step
115112 bool showingBaseParticle; // if true, a copy of particle 0 is shown on the emitter position
@@ -127,7 +124,7 @@ private: · 11 unmodified lines
127124
128125 // private methods
129126 void updateParticle(int index, float deltaTime);
130− void createParticle(int e);
127+ void createParticle(int e, float timeFraction);
131128 void killParticle(int p);
132129 void renderEmitter(int emitterIndex, float size);
133130 void renderParticle(int p);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t