Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 29, 2008, 12:25:22 AM (15 years ago)
Author:
rgrieder
Message:

Made return value of WorldEntity::getNode() const —> Modifying the node_ will not anymore be allowed.
That change implicates:

  • Removed Ogre::SceneNode from ParticleInterface. It gets connected now by the ParticleEmitter
  • Added functions attachOgreObject and detachOgreObject to WorldEntity
  • changed all getNode()→attachObject(…) to attachOgreObject(…)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/orxonox/tools/ParticleInterface.cc

    r2087 r2296  
    5656
    5757        this->scenemanager_ = scenemanager;
    58         this->sceneNode_ = 0;
    5958
    6059        this->bEnabled_ = true;
     
    7271    {
    7372        this->particleSystem_->removeAllEmitters();
    74         this->detachFromSceneNode();
    7573        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         }
    9474    }
    9575
Note: See TracChangeset for help on using the changeset viewer.