Changeset 2161 for code/branches/objecthierarchy/src/orxonox/objects
- Timestamp:
- Nov 9, 2008, 4:28:42 AM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox/objects/worldentities
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Billboard.cc
r2112 r2161 75 75 { 76 76 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1); 77 this->getNode()->attachObject(this->billboard_.getBillboardSet()); 77 if (this->billboard_.getBillboardSet()) 78 this->getNode()->attachObject(this->billboard_.getBillboardSet()); 78 79 this->billboard_.setVisible(this->isVisible()); 79 80 } … … 90 91 { 91 92 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1); 92 this->getNode()->attachObject(this->billboard_.getBillboardSet()); 93 if (this->billboard_.getBillboardSet()) 94 this->getNode()->attachObject(this->billboard_.getBillboardSet()); 93 95 this->billboard_.setVisible(this->isVisible()); 94 96 } -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Camera.cc
r2073 r2161 38 38 #include <OgreViewport.h> 39 39 40 #include "util/Exception.h" 40 41 #include "core/CoreIncludes.h" 41 42 #include "core/ConfigValueIncludes.h" … … 51 52 RegisterObject(Camera); 52 53 53 assert(this->getScene());54 assert(this->getScene()->getSceneManager());54 if (!this->getScene() || !this->getScene()->getSceneManager()) 55 throw AbortLoadingException("Can't create Camera, no scene or no scene manager given."); 55 56 56 57 this->camera_ = this->getScene()->getSceneManager()->createCamera(getUniqueNumberString()); -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/ParticleEmitter.cc
r2114 r2161 37 37 38 38 #include "tools/ParticleInterface.h" 39 #include "util/Exception.h" 39 40 #include "core/CoreIncludes.h" 40 41 #include "core/XMLPort.h" … … 49 50 RegisterObject(ParticleEmitter); 50 51 51 assert(this->getScene());52 assert(this->getScene()->getSceneManager());52 if (!this->getScene() || !this->getScene()->getSceneManager()) 53 throw AbortLoadingException("Can't create Camera, no scene or no scene manager given."); 53 54 54 55 this->particles_ = 0; -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/WorldEntity.cc
r2112 r2161 36 36 #include "core/XMLPort.h" 37 37 #include "util/Convert.h" 38 #include "util/Exception.h" 38 39 39 40 #include "objects/Scene.h" … … 52 53 RegisterObject(WorldEntity); 53 54 54 assert(this->getScene());55 assert(this->getScene()->getRootSceneNode());55 if (!this->getScene() || !this->getScene()->getRootSceneNode()) 56 throw AbortLoadingException("Can't create WorldEntity, no scene or no root-scenenode given."); 56 57 57 58 this->node_ = this->getScene()->getRootSceneNode()->createChildSceneNode(); -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.cc
r2155 r2161 62 62 this->greetingFlare_ = new BillboardSet(); 63 63 this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1); 64 this->getNode()->attachObject(this->greetingFlare_->getBillboardSet()); 64 if (this->greetingFlare_->getBillboardSet()) 65 this->getNode()->attachObject(this->greetingFlare_->getBillboardSet()); 65 66 this->greetingFlare_->setVisible(false); 66 67 this->bGreetingFlareVisible_ = false; … … 76 77 if (this->greetingFlare_) 77 78 { 78 this->getNode()->detachObject(this->greetingFlare_->getBillboardSet()); 79 if (this->greetingFlare_->getBillboardSet()) 80 this->getNode()->detachObject(this->greetingFlare_->getBillboardSet()); 79 81 delete this->greetingFlare_; 80 82 } -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/triggers/Trigger.cc
r2078 r2161 69 69 this->debugBillboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 0.0, 0.0), 1); 70 70 this->debugBillboard_.setVisible(false); 71 } 72 73 this->getNode()->attachObject(this->debugBillboard_.getBillboardSet()); 71 72 if (this->debugBillboard_.getBillboardSet()) 73 this->getNode()->attachObject(this->debugBillboard_.getBillboardSet()); 74 } 75 74 76 this->setObjectMode(0x0); 75 77 } … … 310 312 void Trigger::setBillboardColour(const ColourValue& colour) 311 313 { 312 this->debugBillboard_. getBillboardSet()->getBillboard(0)->setColour(colour);314 this->debugBillboard_.setColour(colour); 313 315 } 314 316
Note: See TracChangeset
for help on using the changeset viewer.