Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5654 in orxonox.OLD for trunk/src/lib/particles


Ignore:
Timestamp:
Nov 20, 2005, 9:12:50 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: cycle-loading of LoadParam works…

Location:
trunk/src/lib/particles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/particles/particle_engine.cc

    r5447 r5654  
    9090void ParticleEngine::loadParams(const TiXmlElement* root)
    9191{
    92   const TiXmlElement* element = root->FirstChildElement();
    93   while( element != NULL)
    94   {
    95     LoadParam<ParticleEngine>(element, "connect", this, &ParticleEngine::addConnection, true)
     92  LOAD_PARAM_START_CYCLE(root, element);
     93  {
     94    LoadParam_CYCLE(element, "connect", this, ParticleEngine, addConnection)
    9695        .describe("connects an Emitter to a System (emitterName, systemName)");
    97     element = element->NextSiblingElement();
    98   }
     96  }
     97  LOAD_PARAM_END_CYCLE(element);
    9998}
    10099
  • trunk/src/lib/particles/particle_system.cc

    r5652 r5654  
    122122      .describe("the maximal count of Particles, that can be emitted into this system");
    123123
    124   //LoadParam<ParticleSystem>(root, "type", this, &ParticleSystem::setType);
    125124  LoadParamNEW(root, "life-span", this, ParticleSystem, setLifeSpan)
    126125      .describe("sets the life-span of the Particles.");
     
    132131      .describe("sets the type of the Particles, (dot, spark, sprite or model)");
    133132
    134   const TiXmlElement* element = root->FirstChildElement();
    135   while (element != NULL)
     133  LOAD_PARAM_START_CYCLE(root, element);
    136134  {
    137 
     135    element->ToText();
    138136  // PER-PARTICLE-ATTRIBUTES:
    139     LoadParam<ParticleSystem>(element, "radius", this, &ParticleSystem::setRadius, true)
     137    LoadParam_CYCLE(element, "radius", this, ParticleSystem, setRadius)
    140138        .describe("The Radius of each particle over time (TimeIndex [0-1], radius at TimeIndex, randomRadius at TimeIndex)");
    141139
    142     LoadParam<ParticleSystem>(element, "mass", this, &ParticleSystem::setMass, true)
     140    LoadParam_CYCLE(element, "mass", this, ParticleSystem, setMass)
    143141        .describe("The Mass of each particle over time (TimeIndex: [0-1], mass at TimeIndex, randomMass at TimeIndex)");
    144142
    145     LoadParam<ParticleSystem>(element, "color", this, &ParticleSystem::setColor, true)
     143    LoadParam_CYCLE(element, "color", this, ParticleSystem, setColor)
    146144        .describe("The Color of each particle over time (TimeIndex: [0-1], red: [0-1], green: [0-1], blue: [0-1], alpha: [0-1])");
    147     element = element->NextSiblingElement();
    148145  }
     146  LOAD_PARAM_END_CYCLE(element);
    149147
    150148}
Note: See TracChangeset for help on using the changeset viewer.