Changeset 4379 in orxonox.OLD for orxonox/trunk
- Timestamp:
- May 29, 2005, 2:41:50 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/subprojects/particles/particle_fun.cc
r4378 r4379 35 35 #define PINIT_PARTICLE_MASS 1.0 36 36 37 38 Field* twirl; 39 Field* gravity; 40 Field* pointGravity; 41 37 42 void Framework::moduleInit(int argc, char** argv) 38 43 { … … 55 60 emitter->setType(PINIT_EMITTER_TYPE); 56 61 emitter->setSize(PINIT_EMITTER_SIZE); 62 emitter->setAbsCoor(Vector(3,0,0)); 57 63 // Add the Flow from the Emitter into the System 58 64 ParticleEngine::getInstance()->addConnection(emitter, system); 59 65 60 66 61 Field* twirl = new Twirl(); 62 twirl->setMagnitude(.1); 63 new PhysicsConnection(system, twirl); 67 twirl = new Twirl(); 68 twirl->setMagnitude(10); 69 gravity = new Gravity(); 70 pointGravity = new PointGravity(); 64 71 } 65 72 … … 200 207 } 201 208 209 int fieldsChange(GtkWidget* nonInterest, void* widget) 210 { 211 Option* option = (Option*) widget; 212 const char* name = option->getTitle(); 213 char* value = option->save(); 214 215 216 if (!strcmp(name, "Twirl")) 217 { 218 if (static_cast<CheckButton*>(option)->isActive()) 219 new PhysicsConnection(ParticleEngine::getInstance()->getSystemByNumber(1), twirl); 220 else 221 ; 222 } 223 224 } 202 225 203 226 void Framework::moduleInitGui(int argc, char** argv) … … 209 232 guiMainWindow = new Window("ParticlesFUN"); 210 233 { 211 Box* windowBox = new Box(' v');234 Box* windowBox = new Box('h'); 212 235 { 213 236 Frame* emitterFrame = new Frame("emitter-settings"); … … 318 341 } 319 342 windowBox->fill(systemFrame); 343 344 Frame* fieldsFrame = new Frame("Field-Settings"); 345 { 346 Box* fieldsBox = new Box('v'); 347 { 348 CheckButton* Twirl = new CheckButton("Twirl"); 349 Twirl->connectSignal("clicked", (void*)Twirl, fieldsChange); 350 fieldsBox->fill(Twirl); 351 } 352 fieldsFrame->fill(fieldsBox); 353 } 354 windowBox->fill(fieldsFrame); 320 355 321 356 Button* quitButton = new Button("quit");
Note: See TracChangeset
for help on using the changeset viewer.