Changeset 4639 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Jun 16, 2005, 1:59:25 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/particles/particle_emitter.cc
r4597 r4639 42 42 this->setEmissionRate(emissionRate); 43 43 this->setEmissionVelocity(velocity); 44 45 ParticleEngine::getInstance()->addEmitter(this); 44 46 } 45 47 … … 129 131 { 130 132 if (!strcmp(type, "plane")) 131 this-> type = EMITTER_PLANE;133 this->setType(EMITTER_PLANE); 132 134 else if (!strcmp(type, "cube")) 133 this-> type = EMITTER_CUBE;135 this->setType(EMITTER_CUBE); 134 136 else if (!strcmp(type, "sphere")) 135 this->type = EMITTER_SPHERE; 136 else 137 this->type = EMITTER_DOT; 137 this->setType(EMITTER_SPHERE); 138 else 139 this->setType(EMITTER_DOT); 140 } 141 142 const char* ParticleEmitter::getTypeC(void) const 143 { 144 if (this->type == EMITTER_PLANE) 145 return "EMITTER_PLANE"; 146 else if (this->type == EMITTER_CUBE) 147 return "EMITTER_CUBE"; 148 else if (this->type == EMITTER_SPHERE) 149 return "EMITTER_SPHERE"; 150 else 151 return "EMITTER_DOT"; 152 153 138 154 } 139 155 … … 262 278 \brief outputs some nice debug information 263 279 */ 264 void ParticleEmitter::debug(void) 280 void ParticleEmitter::debug(void) const 265 281 { 266 282 PRINT(0)(" Emitter %s\n", this->getName()); 267 } 283 PRINT(0)(" EmissionRate: %f, Speed: %f, SpreadAngle: %f\n", this->getEmissionRate(), this->getEmissionVelocity(), this->getSpread()); 284 PRINT(0)(" Size %f, Type: %s\n", this->getSize(), this->getTypeC()); 285 } -
orxonox/trunk/src/lib/particles/particle_emitter.h
r4597 r4639 49 49 /** \returns the type of the emitter */ 50 50 inline EMITTER_TYPE getType(void) const { return this->type; }; 51 /** \returns the Type as a const char * */ 52 const char* getTypeC(void) const; 51 53 /** \returns the Size of the emitter */ 52 54 inline float getSize(void) const { return this->emitterSize; }; … … 56 58 inline float getInheritSpeed(void) const { return this->inheritSpeed; }; 57 59 /** \returns the SpreadAngle of the emitter */ 58 inline float getSpread(void) { return this->angle; };60 inline float getSpread(void) const { return this->angle; }; 59 61 /** \returns the EmissionVelocity of the emitter */ 60 inline float getEmissionVelocity(void) { return this->velocity; };62 inline float getEmissionVelocity(void) const { return this->velocity; }; 61 63 62 void debug(void) ;64 void debug(void) const; 63 65 64 66 -
orxonox/trunk/src/lib/particles/particle_engine.cc
r4597 r4639 357 357 PRINT(0)(" Reference: %p\n", ParticleEngine::singletonRef); 358 358 PRINT(0)(" Count: Emitters: %d; Systems: %d, Connections: %d\n", 359 this->emitterList->getSize(), this->systemList->getSize(), this->connectionList->getSize()); 359 this->emitterList->getSize(), this->systemList->getSize(), this->connectionList->getSize()); 360 360 361 if (this->connectionList->getSize() > 0) 361 { 362 PRINT(0)(" Connections:\n"); 363 PRINT(0)(" -----------------------------------\n"); 364 365 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 366 ParticleConnection* tmpConnection = tmpConIt->nextElement(); 367 while(tmpConnection) 368 { 369 PRINT(0)(" Emitter '%s' emitts into System '%s'\n", tmpConnection->emitter->getName(), tmpConnection->system->getName()); 370 tmpConnection = tmpConIt->nextElement(); 371 } 372 delete tmpConIt; 373 } 362 { 363 PRINT(0)(" Connections:\n"); 364 PRINT(0)(" -----------------------------------\n"); 365 366 tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator(); 367 ParticleConnection* tmpConnection = tmpConIt->nextElement(); 368 while(tmpConnection) 369 { 370 PRINT(0)(" Emitter '%s' emitts into System '%s'\n", tmpConnection->emitter->getName(), tmpConnection->system->getName()); 371 tmpConnection = tmpConIt->nextElement(); 372 } 373 delete tmpConIt; 374 } 375 374 376 if (this->systemList->getSize() > 0) 375 { 376 tIterator<ParticleSystem>* tmpIt = systemList->getIterator(); 377 ParticleSystem* tmpSys = tmpIt->nextElement(); 378 while(tmpSys) 379 { 380 tmpSys->debug(); 381 tmpSys = tmpIt->nextElement(); 382 } 383 delete tmpIt; 384 } 377 { 378 tIterator<ParticleSystem>* tmpIt = systemList->getIterator(); 379 ParticleSystem* tmpSys = tmpIt->nextElement(); 380 while(tmpSys) 381 { 382 tmpSys->debug(); 383 tmpSys = tmpIt->nextElement(); 384 } 385 delete tmpIt; 386 } 387 else 388 { 389 PRINT(0)("NO SYSTEMS\n"); 390 } 391 if (this->emitterList->getSize() > 0) 392 { 393 tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator(); 394 ParticleEmitter* tmpEmit = tmpIt->nextElement(); 395 while(tmpEmit) 396 { 397 tmpEmit->debug(); 398 tmpEmit = tmpIt->nextElement(); 399 } 400 delete tmpIt; 401 } 402 else 403 { 404 PRINTF(0)("NO EMITTERS\n"); 405 } 385 406 386 407 PRINT(0)("+--------------------------------PE-+\n"); -
orxonox/trunk/src/subprojects/importer/Makefile.in
r4634 r4639 205 205 importer_LDADD = $(MAINSRCDIR)/lib/event/libORXevent.a \ 206 206 $(MAINSRCDIR)/lib/tinyxml/libtinyxml.a \ 207 207 $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a 208 208 209 209 importer_SOURCES = ../framework.cc \ 210 211 212 213 214 215 216 217 218 219 220 221 222 223 210 importer.cc \ 211 $(MAINSRCDIR)/lib/graphics/light.cc \ 212 $(MAINSRCDIR)/util/state.cc \ 213 $(MAINSRCDIR)/world_entities/camera.cc \ 214 $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \ 215 $(MAINSRCDIR)/lib/lang/base_object.cc \ 216 $(MAINSRCDIR)/lib/math/vector.cc \ 217 $(MAINSRCDIR)/util/resource_manager.cc \ 218 $(MAINSRCDIR)/lib/util/ini_parser.cc \ 219 $(MAINSRCDIR)/lib/graphics/text_engine.cc \ 220 $(MAINSRCDIR)/lib/coord/p_node.cc \ 221 $(MAINSRCDIR)/lib/coord/null_parent.cc \ 222 $(MAINSRCDIR)/util/loading/load_param.cc \ 223 $(MAINSRCDIR)/lib/util/substring.cc 224 224 225 225 all: all-am -
orxonox/trunk/src/subprojects/particles/particle_fun.cc
r4637 r4639 49 49 50 50 // Creating a Test Particle System 51 51 52 ParticleSystem* system = new ParticleSystem(100000, PINIT_PARTICLE_TYPE); 52 53 system->setRadius(0, PINIT_START_RADIUS, 0 ); … … 55 56 56 57 system->setConserve(PINIT_CONSERVE_FACTOR); 57 system->setMass(5,3,6);58 //system->setMass(5,3,6); 58 59 59 60 // Creating a Test Particle Emitter
Note: See TracChangeset
for help on using the changeset viewer.