Changeset 4727 in orxonox.OLD for orxonox/trunk/src/lib/particles
- Timestamp:
- Jun 28, 2005, 10:58:18 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/particles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/particles/particle_system.cc
r4726 r4727 44 44 this->init(); 45 45 46 this-> maxCount = maxCount;46 this->setMaxCount(maxCount); 47 47 this->setType(type, 1); 48 48 } … … 98 98 this->material = NULL; 99 99 this->model = NULL; 100 this-> maxCount = PARTICLE_DEFAULT_MAX_COUNT;100 this->setMaxCount(PARTICLE_DEFAULT_MAX_COUNT); 101 101 this->count = 0; 102 102 this->particles = NULL; … … 119 119 static_cast<PhysicsInterface*>(this)->loadParams(root); 120 120 121 LoadParam<ParticleSystem>(root, "max-count", this, &ParticleSystem::setMaxCount) 122 .describe("the maximal count of Particles, that can be emitted into this system"); 123 121 124 //LoadParam<ParticleSystem>(root, "type", this, &ParticleSystem::setType); 122 125 LoadParam<ParticleSystem>(root, "life-span", this, &ParticleSystem::setLifeSpan) … … 126 129 .describe("sets the Conserve facrot of the Particles (1.0: they keep all their energy, 0.0:they keep no energy)"); 127 130 128 LoadParam<ParticleSystem>(root, "type", this, &ParticleSystem::setType) 129 .describe("sets the type of the Particles, (dot, spark, sprite or model)"); 131 const TiXmlElement* element = root->FirstChildElement(); 132 while (element != NULL) 133 { 134 LoadParam<ParticleSystem>(element, "type", this, &ParticleSystem::setType, true) 135 .describe("sets the type of the Particles, (dot, spark, sprite or model)"); 130 136 131 137 // PER-PARTICLE-ATTRIBUTES: 132 LoadParam<ParticleSystem>(root, "radius", this, &ParticleSystem::setRadius) 133 .describe("The Radius of each particle over time (TimeIndex [0-1], radius at TimeIndex, randomRadius at TimeIndex)"); 134 135 LoadParam<ParticleSystem>(root, "mass", this, &ParticleSystem::setMass) 136 .describe("The Mass of each particle over time (TimeIndex: [0-1], mass at TimeIndex, randomMass at TimeIndex)"); 137 138 LoadParam<ParticleSystem>(root, "color", this, &ParticleSystem::setColor) 139 .describe("The Color of each particle over time (TimeIndex: [0-1], red: [0-1], green: [0-1], blue: [0-1], alpha: [0-1])"); 140 } 138 LoadParam<ParticleSystem>(element, "radius", this, &ParticleSystem::setRadius, true) 139 .describe("The Radius of each particle over time (TimeIndex [0-1], radius at TimeIndex, randomRadius at TimeIndex)"); 140 141 LoadParam<ParticleSystem>(element, "mass", this, &ParticleSystem::setMass, true) 142 .describe("The Mass of each particle over time (TimeIndex: [0-1], mass at TimeIndex, randomMass at TimeIndex)"); 143 144 LoadParam<ParticleSystem>(element, "color", this, &ParticleSystem::setColor, true) 145 .describe("The Color of each particle over time (TimeIndex: [0-1], red: [0-1], green: [0-1], blue: [0-1], alpha: [0-1])"); 146 element = element->NextSiblingElement(); 147 } 148 149 } 150 151 /** 152 \param maxCount the maximum count of particles that can be emitted 153 */ 154 void ParticleSystem::setMaxCount(int maxCount) 155 { 156 this->maxCount = maxCount; 157 } 158 159 141 160 /** 142 161 \param particleType the type of particles in this System -
orxonox/trunk/src/lib/particles/particle_system.h
r4725 r4727 82 82 void setLifeSpan(float lifeSpan, float randomLifeSpan = 0.0); 83 83 void setConserve(float conserve); 84 void setMaxCount(int maxCount); 84 85 85 86 /* Per-Particle-Attributes */
Note: See TracChangeset
for help on using the changeset viewer.