Changeset 4726 in orxonox.OLD for orxonox/trunk/src/lib/particles/particle_engine.cc
- Timestamp:
- Jun 28, 2005, 10:33:14 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/particles/particle_engine.cc
r4639 r4726 24 24 #include "debug.h" 25 25 #include "stdlibincl.h" 26 #include "load_param.h" 26 27 27 28 using namespace std; … … 82 83 83 84 /** 85 \brief loads the ParticleEngines settings and connections between particles and emitters 86 \param root the XML-element to load this from. 87 */ 88 void ParticleEngine::loadParams(const TiXmlElement* root) 89 { 90 const TiXmlElement* element = root->FirstChildElement(); 91 while( element != NULL) 92 { 93 LoadParam<ParticleEngine>(element, "connect", this, &ParticleEngine::addConnection, true) 94 .describe("connects an Emitter to a System (emitterName, systemName)"); 95 element = element->NextSiblingElement(); 96 } 97 } 98 99 100 101 /** 84 102 \brief Adds a System to the System list. 85 103 … … 99 117 { 100 118 this->emitterList->add(emitter); 119 } 120 121 /** 122 \brief Connects a ParticleSystem to a ParticleSystem thus emitting Particles. 123 \param emitter the Emitter to connect to the System 124 \param system the System to connect to the Emitter 125 */ 126 void ParticleEngine::addConnection(const char* emitter, const char* system) 127 { 128 ParticleEmitter* tmpEmit = this->getEmitterByName(emitter); 129 ParticleSystem* tmpSys = this->getSystemByName(system); 130 131 if (tmpEmit != NULL && tmpSys != NULL) 132 this->addConnection(tmpEmit, tmpSys); 133 else 134 { 135 if (tmpEmit == NULL) 136 PRINTF(2)("Emitter %s not found in the List of emitters, not connecting to %s\n", emitter, system); 137 if (tmpEmit == NULL) 138 PRINTF(2)("System %s not found in the List of emitters, not connecting to %s\n", system, emitter); 139 } 101 140 } 102 141
Note: See TracChangeset
for help on using the changeset viewer.