Changeset 4383 in orxonox.OLD for orxonox/trunk/src/subprojects
- Timestamp:
- May 29, 2005, 9:20:42 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/subprojects/particles/particle_fun.cc
r4381 r4383 67 67 68 68 twirl = new Twirl(); 69 twirl->setMagnitude( 10);69 twirl->setMagnitude(0); 70 70 gravity = new Gravity(); 71 gravity->setMagnitude(0); 71 72 pointGravity = new PointGravity(); 73 pointGravity->setMagnitude(0); 74 75 new PhysicsConnection(system, gravity); 76 new PhysicsConnection(system, twirl); 77 new PhysicsConnection(system, pointGravity); 72 78 } 73 79 … … 175 181 } 176 182 183 else if (!strcmp(name, "Mass")) 184 { 185 tmpSys->setMass(atof(value)); 186 PRINT(4)("ParticleMass set to %f\n", atof(value)); 187 } 188 177 189 else if (!strcmp(name, "ConserveFactor")) 178 190 { … … 215 227 216 228 217 if (!strcmp(name, "Twirl")) 218 { 219 if (static_cast<CheckButton*>(option)->isActive()) 220 new PhysicsConnection(ParticleEngine::getInstance()->getSystemByNumber(1), twirl); 221 else 222 ; 229 if (!strcmp(name, "Gravity")) 230 { 231 gravity->setMagnitude(atof(value)); 232 } 233 234 else if (!strcmp(name, "Twirl")) 235 { 236 twirl->setMagnitude(atof(value)); 237 } 238 239 else if (!strcmp(name, "PointGravity")) 240 { 241 pointGravity->setMagnitude(atof(value)); 223 242 } 224 243 … … 303 322 systemBox->fill(EndRadius); 304 323 324 systemBox->fill(new Label("ParticleMass")); 325 Slider* Mass = new Slider("Mass", 0, 10); 326 Mass->setExactness(2); 327 Mass->connectSignal("value_changed", (void*)Mass, systemChange ); 328 Mass->setValue(PINIT_PARTICLE_MASS); 329 Mass->redraw(); 330 systemBox->fill(Mass); 331 332 305 333 systemBox->fill(new Label("LifeSpan")); 306 334 Slider* LifeSpan = new Slider("LifeSpan", 0, 10); … … 347 375 Box* fieldsBox = new Box('v'); 348 376 { 349 CheckButton* Twirl = new CheckButton("Twirl"); 350 Twirl->connectSignal("clicked", (void*)Twirl, fieldsChange); 377 fieldsBox->fill(new Label("Gravity")); 378 Slider* Gravity = new Slider("Gravity", 0, 10); 379 Gravity->setExactness(1); 380 Gravity->connectSignal("value_changed", (void*)Gravity, fieldsChange ); 381 Gravity->setValue(0); 382 Gravity->redraw(); 383 fieldsBox->fill(Gravity); 384 385 386 fieldsBox->fill(new Label("Twirl")); 387 Slider* Twirl = new Slider("Twirl", 0, 10); 388 Twirl->setExactness(1); 389 Twirl->connectSignal("value_changed", (void*)Twirl, fieldsChange ); 390 Twirl->setValue(0); 391 Twirl->redraw(); 351 392 fieldsBox->fill(Twirl); 393 394 395 fieldsBox->fill(new Label("PointGravity")); 396 Slider* PointGravity = new Slider("PointGravity", 0, 10); 397 PointGravity->setExactness(1); 398 PointGravity->connectSignal("value_changed", (void*)PointGravity, fieldsChange ); 399 PointGravity->setValue(0); 400 PointGravity->redraw(); 401 fieldsBox->fill(PointGravity); 402 352 403 } 353 404 fieldsFrame->fill(fieldsBox);
Note: See TracChangeset
for help on using the changeset viewer.