Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 16, 2005, 1:31:24 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: particles_fun compiles again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/subprojects/particles/particle_fun.cc

    r4555 r4637  
    5050  // Creating a Test Particle System
    5151  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 );
    5354  system->setLifeSpan(PINIT_LIFESPAN);
    5455
     
    153154          PRINT(4)("EmitterSize set to %f\n", atof(value));
    154155        }
     156        else if (!strcmp(name, "InheritSpeed"))
     157        {
     158          tmpEmit->setInheritSpeed(atof(value));
     159          PRINT(4)("ParticleInheritSpeed set to %f\n", atof(value));
     160        }
    155161    }
    156162  delete value;
     
    169175      if (!strcmp(name, "StartRadius"))
    170176        {
    171           tmpSys->setRadius(atof(value), tmpSys->getEndRadius());
     177          tmpSys->setRadius(0, atof(value));
    172178          PRINT(4)("ParticleStartRadius set to %f\n", atof(value));
    173179        }
    174180      else if (!strcmp(name, "EndRadius"))
    175181        {
    176           tmpSys->setRadius( tmpSys->getStartRadius(), atof(value));
     182          tmpSys->setRadius( 1, atof(value));
    177183          PRINT(4)("ParticleEndRadius set to %f\n", atof(value));
    178184        }
     
    186192      else if (!strcmp(name, "Mass"))
    187193        {
    188           tmpSys->setMass(atof(value));
     194          tmpSys->setMass(0, atof(value));
    189195          PRINT(4)("ParticleMass set to %f\n", atof(value));
    190196        }
     
    208214        }
    209215
    210       else if (!strcmp(name, "InheritSpeed"))
    211         {
    212           tmpSys->setInheritSpeed(atof(value));
    213           PRINT(4)("ParticleInheritSpeed set to %f\n", atof(value));
    214         }
    215216      else if (!strcmp(name, "RandomColor"))
    216217        {
    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                           (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, (float)rand()/RAND_MAX, 0);
     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);
    220221        }
    221222    }
     
    300301          EmitterSize->redraw();
    301302          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);
    302309        }
    303310        emitterFrame->fill(emitterBox);
     
    359366          systemBox->fill(ParticleType);
    360367
    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 
    367368          Button* RandomColor = new Button("RandomColor");
    368369          RandomColor->connectSignal("released", (void*)RandomColor, systemChange);
Note: See TracChangeset for help on using the changeset viewer.