Changeset 4727 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Jun 28, 2005, 10:58:18 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 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 */ -
orxonox/trunk/src/story_entities/world.cc
r4726 r4727 498 498 499 499 // SYSTEM OF THE VULCANO 500 ParticleSystem* vulcanSysFog = new ParticleSystem(10000, PARTICLE_SPRITE);501 vulcanSysFog->setLifeSpan(5, 2);502 vulcanSysFog->setRadius(0.0, 20.0, 10);503 vulcanSysFog->setRadius(.2, 50, 30);504 vulcanSysFog->setRadius(1.0, 200, 100);505 vulcanSysFog->setMass (0.0, 1.0);506 vulcanSysFog->setColor(0, 1, 1, 1, .5);507 vulcanSysFog->setColor(.5, .6, .6, .6, .2);508 vulcanSysFog->setColor(1, .0, .0, .0, 0);509 510 ParticleEmitter* vulcanEmitFog = new ParticleEmitter(Vector(0,1,0), .5, 200, 150);511 vulcanEmitFog->setEmissionVelocity(150, 50);512 vulcanEmitFog->setType(EMITTER_CUBE);513 vulcanEmitFog->setSize(40);514 vulcanEmitFog->setRelCoor(2460,105, 606);515 ParticleEngine::getInstance()->addConnection(vulcanEmitFog, vulcanSysFog);500 // ParticleSystem* vulcanSysFog = new ParticleSystem(10000, PARTICLE_SPRITE); 501 // vulcanSysFog->setLifeSpan(5, 2); 502 // vulcanSysFog->setRadius(0.0, 20.0, 10); 503 // vulcanSysFog->setRadius(.2, 50, 30); 504 // vulcanSysFog->setRadius(1.0, 200, 100); 505 // vulcanSysFog->setMass (0.0, 1.0); 506 // vulcanSysFog->setColor(0, 1, 1, 1, .5); 507 // vulcanSysFog->setColor(.5, .6, .6, .6, .2); 508 // vulcanSysFog->setColor(1, .0, .0, .0, 0); 509 // 510 // ParticleEmitter* vulcanEmitFog = new ParticleEmitter(Vector(0,1,0), .5, 200, 150); 511 // vulcanEmitFog->setEmissionVelocity(150, 50); 512 // vulcanEmitFog->setType(EMITTER_CUBE); 513 // vulcanEmitFog->setSize(40); 514 // vulcanEmitFog->setRelCoor(2460,105, 606); 515 // ParticleEngine::getInstance()->addConnection(vulcanEmitFog, vulcanSysFog); 516 516 517 517
Note: See TracChangeset
for help on using the changeset viewer.