Changeset 4430 in orxonox.OLD for orxonox/trunk/src/lib/particles
- Timestamp:
- Jun 1, 2005, 10:19:38 AM (19 years ago)
- Location:
- orxonox/trunk/src/lib/particles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/particles/particle_system.cc
r4421 r4430 53 53 this->setInheritSpeed(0); 54 54 this->glID = NULL; 55 this->setRadius(1.0, 1.0, 0.0);56 55 this->setType(type, 1); 57 this->setColor(1.0,1.0,1.0,1.0, .5,.5,.5,.5, .0,.0,.0,.0); 58 this->setMass(1.0, 0.0); 56 // this->setColor(1.0,1.0,1.0,1.0, .5,.5,.5,.5, .0,.0,.0,.0); 59 57 ParticleEngine::getInstance()->addSystem(this); 60 61 radiusAnim.addEntry(0.0,5);62 63 radiusAnim.addEntry(.80,3);64 65 radiusAnim.addEntry(.5, 0);66 58 } 67 59 … … 148 140 } 149 141 150 151 152 142 /** 153 143 \brief how much of the speed from the ParticleEmitter should flow onto the ParticleSystem … … 178 168 179 169 /** 180 \brief sets the radius of newly created particles181 */182 void ParticleSystem::setRadius(float startRadius, float endRadius, float randomStartRadius, float randomEndRadius)183 {184 this->startRadius = startRadius;185 this->endRadius = endRadius;186 this->randomStartRadius = randomStartRadius;187 this->randomEndRadius = randomEndRadius;188 }189 190 /**191 \brief sets the initial mass of any particle192 */193 void ParticleSystem::setMass(float mass, float randomMass)194 {195 this->initialMass = mass;196 this->randomInitialMass = randomMass;197 }198 199 /**200 170 \brief sets the conserve Factor of newly created particles 201 171 */ … … 210 180 } 211 181 182 ///////////////////////////// 183 /* Per-Particle Attributes */ 184 ///////////////////////////// 185 /** 186 \brief sets a key in the radius-animation on a per-particle basis 187 \param lifeCycleTime the time (partilceLifeTime/particleAge) [0-1] 188 \param radius the radius at this position 189 \param randRadius the randRadius at this position 190 */ 191 void ParticleSystem::setRadius(float lifeCycleTime, float radius, float randRadius) 192 { 193 this->radiusAnim.addEntry(lifeCycleTime, radius); 194 this->randRadiusAnim.addEntry(lifeCycleTime, randRadius); 195 } 196 197 /** 198 \brief sets a key in the mass-animation on a per-particle basis 199 \param lifeCycleTime the time (partilceLifeTime/particleAge) [0-1] 200 \param mass the mass at this position 201 \param randMass the randomMass at this position 202 */ 203 void ParticleSystem::setMass(float lifeCycleTime, float mass, float randMass) 204 { 205 this->massAnim.addEntry(lifeCycleTime, mass); 206 this->randMassAnim.addEntry(lifeCycleTime, randMass); 207 } 212 208 213 209 /** -
orxonox/trunk/src/lib/particles/particle_system.h
r4421 r4430 74 74 void setInheritSpeed(float value); 75 75 void setLifeSpan(float lifeSpan, float randomLifeSpan = 0.0); 76 void setRadius(float startRadius, float endRadius,77 float randomStartRadius = 0.0, float randomEndRadius = 0.0);78 76 void setConserve(float conserve); 79 void setMass(float mass, float randomMass = 0.0);80 77 78 /* Per-Particle-Attributes */ 79 void setRadius(float lifeCycleTime, float radius, float randRadius = 0.0); 80 void setMass(float lifeCycleTime, float mass, float randMass = 0.0); 81 81 void setColor(GLfloat br, GLfloat bg, GLfloat bb, GLfloat ba, 82 82 GLfloat mr, GLfloat mg, GLfloat mb, GLfloat ma, 83 83 GLfloat er, GLfloat eg, GLfloat eb, GLfloat ea); 84 85 84 86 85 87 /** \returns the Type of the particles */ … … 140 142 141 143 QuickAnimation radiusAnim; 144 QuickAnimation randRadiusAnim; 145 QuickAnimation massAnim; 146 QuickAnimation randMassAnim; 147 QuickAnimation colorAnim[4]; 142 148 }; 143 149
Note: See TracChangeset
for help on using the changeset viewer.