Changeset 2296 for code/branches/physics/src/orxonox/objects/worldentities
- Timestamp:
- Nov 29, 2008, 12:25:22 AM (16 years ago)
- Location:
- code/branches/physics/src/orxonox/objects/worldentities
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/orxonox/objects/worldentities/Billboard.cc
r2087 r2296 50 50 { 51 51 if (this->isInitialized() && this->billboard_.getBillboardSet()) 52 this-> getNode()->detachObject(this->billboard_.getName());52 this->detachOgreObject(this->billboard_.getName()); 53 53 } 54 54 } … … 75 75 { 76 76 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1); 77 this-> getNode()->attachObject(this->billboard_.getBillboardSet());77 this->attachOgreObject(this->billboard_.getBillboardSet()); 78 78 this->billboard_.setVisible(this->isVisible()); 79 79 } … … 90 90 { 91 91 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1); 92 this-> getNode()->attachObject(this->billboard_.getBillboardSet());92 this->attachOgreObject(this->billboard_.getBillboardSet()); 93 93 this->billboard_.setVisible(this->isVisible()); 94 94 } -
code/branches/physics/src/orxonox/objects/worldentities/Camera.cc
r2103 r2296 55 55 56 56 this->camera_ = this->getScene()->getSceneManager()->createCamera(getUniqueNumberString()); 57 this-> getNode()->attachObject(this->camera_);57 this->attachOgreObject(this->camera_); 58 58 59 59 this->bHasFocus_ = false; -
code/branches/physics/src/orxonox/objects/worldentities/Light.cc
r2087 r2296 53 53 if (this->getScene() && this->getScene()->getSceneManager()) 54 54 this->light_ = this->getScene()->getSceneManager()->createLight("Light" + convertToString(Light::lightCounter_s++)); 55 this-> getNode()->attachObject(this->light_);55 this->attachOgreObject(this->light_); 56 56 57 57 this->registerVariables(); -
code/branches/physics/src/orxonox/objects/worldentities/Model.cc
r2087 r2296 48 48 { 49 49 if (this->isInitialized() && this->mesh_.getEntity()) 50 this-> getNode()->detachObject(this->mesh_.getEntity());50 this->detachOgreObject(this->mesh_.getEntity()); 51 51 } 52 52 … … 68 68 { 69 69 if (this->mesh_.getEntity()) 70 this-> getNode()->detachObject(this->mesh_.getEntity());70 this->detachOgreObject(this->mesh_.getEntity()); 71 71 72 72 this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_); … … 74 74 if (this->mesh_.getEntity()) 75 75 { 76 this-> getNode()->attachObject(this->mesh_.getEntity());76 this->attachOgreObject(this->mesh_.getEntity()); 77 77 this->mesh_.getEntity()->setCastShadows(this->bCastShadows_); 78 78 this->mesh_.setVisible(this->isVisible()); -
code/branches/physics/src/orxonox/objects/worldentities/ParticleEmitter.cc
r2087 r2296 61 61 { 62 62 if (this->isInitialized() && this->particles_) 63 { 64 this->detachOgreObject(this->particles_->getParticleSystem()); 63 65 delete this->particles_; 66 } 64 67 } 65 68 … … 104 107 { 105 108 this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), this->source_, this->LOD_); 106 this-> particles_->addToSceneNode(this->getNode());109 this->attachOgreObject(particles_->getParticleSystem()); 107 110 this->particles_->setVisible(this->isVisible()); 108 111 this->particles_->setEnabled(this->isActive()); -
code/branches/physics/src/orxonox/objects/worldentities/WorldEntity.h
r2292 r2296 61 61 void registerVariables(); 62 62 63 inline Ogre::SceneNode* getNode() const63 inline const Ogre::SceneNode* getNode() const 64 64 { return this->node_; } 65 65 … … 145 145 { return this->children_; } 146 146 147 inline void attachOgreObject(Ogre::MovableObject* object) 148 { this->node_->attachObject(object); } 149 inline void detachOgreObject(Ogre::MovableObject* object) 150 { this->node_->detachObject(object); } 151 inline Ogre::MovableObject* detachOgreObject(const Ogre::String& name) 152 { return this->node_->detachObject(name); } 153 147 154 inline void attachToParent(WorldEntity* parent) 148 155 { parent->attach(this); } -
code/branches/physics/src/orxonox/objects/worldentities/triggers/Trigger.cc
r2103 r2296 71 71 } 72 72 73 this-> getNode()->attachObject(this->debugBillboard_.getBillboardSet());73 this->attachOgreObject(this->debugBillboard_.getBillboardSet()); 74 74 this->setObjectMode(0x0); 75 75 }
Note: See TracChangeset
for help on using the changeset viewer.