Changeset 2296 for code/branches/physics/src/orxonox/tools
- Timestamp:
- Nov 29, 2008, 12:25:22 AM (16 years ago)
- Location:
- code/branches/physics/src/orxonox/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/orxonox/tools/ParticleInterface.cc
r2087 r2296 56 56 57 57 this->scenemanager_ = scenemanager; 58 this->sceneNode_ = 0;59 58 60 59 this->bEnabled_ = true; … … 72 71 { 73 72 this->particleSystem_->removeAllEmitters(); 74 this->detachFromSceneNode();75 73 this->scenemanager_->destroyParticleSystem(particleSystem_); 76 }77 78 void ParticleInterface::addToSceneNode(Ogre::SceneNode* sceneNode)79 {80 if (this->sceneNode_)81 this->detachFromSceneNode();82 83 this->sceneNode_ = sceneNode;84 this->sceneNode_->attachObject(this->particleSystem_);85 }86 87 void ParticleInterface::detachFromSceneNode()88 {89 if (this->sceneNode_)90 {91 this->sceneNode_->detachObject(this->particleSystem_);92 this->sceneNode_ = 0;93 }94 74 } 95 75 -
code/branches/physics/src/orxonox/tools/ParticleInterface.h
r2087 r2296 54 54 { return this->particleSystem_; } 55 55 56 void addToSceneNode(Ogre::SceneNode* sceneNode);57 void detachFromSceneNode();58 59 56 Ogre::ParticleEmitter* createNewEmitter(); 60 57 Ogre::ParticleEmitter* getEmitter(unsigned int emitterNr) const; … … 96 93 static unsigned int counter_s; 97 94 98 Ogre::SceneNode* sceneNode_;99 95 Ogre::ParticleSystem* particleSystem_; 100 96 bool bVisible_;
Note: See TracChangeset
for help on using the changeset viewer.