Changeset 4637 in orxonox.OLD for orxonox/trunk/src/subprojects/particles/particle_fun.cc
- Timestamp:
- Jun 16, 2005, 1:31:24 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/subprojects/particles/particle_fun.cc
r4555 r4637 50 50 // Creating a Test Particle System 51 51 ParticleSystem* system = new ParticleSystem(100000, PINIT_PARTICLE_TYPE); 52 system->setRadius(PINIT_START_RADIUS, PINIT_END_RADIUS ,0 ,0); 52 system->setRadius(0, PINIT_START_RADIUS, 0 ); 53 system->setRadius(1, PINIT_END_RADIUS, 0 ); 53 54 system->setLifeSpan(PINIT_LIFESPAN); 54 55 … … 153 154 PRINT(4)("EmitterSize set to %f\n", atof(value)); 154 155 } 156 else if (!strcmp(name, "InheritSpeed")) 157 { 158 tmpEmit->setInheritSpeed(atof(value)); 159 PRINT(4)("ParticleInheritSpeed set to %f\n", atof(value)); 160 } 155 161 } 156 162 delete value; … … 169 175 if (!strcmp(name, "StartRadius")) 170 176 { 171 tmpSys->setRadius( atof(value), tmpSys->getEndRadius());177 tmpSys->setRadius(0, atof(value)); 172 178 PRINT(4)("ParticleStartRadius set to %f\n", atof(value)); 173 179 } 174 180 else if (!strcmp(name, "EndRadius")) 175 181 { 176 tmpSys->setRadius( tmpSys->getStartRadius(), atof(value));182 tmpSys->setRadius( 1, atof(value)); 177 183 PRINT(4)("ParticleEndRadius set to %f\n", atof(value)); 178 184 } … … 186 192 else if (!strcmp(name, "Mass")) 187 193 { 188 tmpSys->setMass( atof(value));194 tmpSys->setMass(0, atof(value)); 189 195 PRINT(4)("ParticleMass set to %f\n", atof(value)); 190 196 } … … 208 214 } 209 215 210 else if (!strcmp(name, "InheritSpeed"))211 {212 tmpSys->setInheritSpeed(atof(value));213 PRINT(4)("ParticleInheritSpeed set to %f\n", atof(value));214 }215 216 else if (!strcmp(name, "RandomColor")) 216 217 { 217 tmpSys->setColor( (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, 1,218 (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, .5,219 218 tmpSys->setColor(0, (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, 1); 219 tmpSys->setColor(.5, (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, .5); 220 tmpSys->setColor(.5, (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, 0); 220 221 } 221 222 } … … 300 301 EmitterSize->redraw(); 301 302 emitterBox->fill(EmitterSize); 303 304 emitterBox->fill(new Label("InheritSpeed")); 305 Slider* InheritSpeed = new Slider("InheritSpeed", 0, 1); 306 InheritSpeed->setExactness(3); 307 InheritSpeed->connectSignal("value_changed", (void*)InheritSpeed, emitterChange ); 308 emitterBox->fill(InheritSpeed); 302 309 } 303 310 emitterFrame->fill(emitterBox); … … 359 366 systemBox->fill(ParticleType); 360 367 361 systemBox->fill(new Label("InheritSpeed"));362 Slider* InheritSpeed = new Slider("InheritSpeed", 0, 1);363 InheritSpeed->setExactness(3);364 InheritSpeed->connectSignal("value_changed", (void*)InheritSpeed, systemChange );365 systemBox->fill(InheritSpeed);366 367 368 Button* RandomColor = new Button("RandomColor"); 368 369 RandomColor->connectSignal("released", (void*)RandomColor, systemChange);
Note: See TracChangeset
for help on using the changeset viewer.