Changeset 1653 for code/branches/gui/src/orxonox/objects
- Timestamp:
- Aug 5, 2008, 9:50:26 PM (16 years ago)
- Location:
- code/branches/gui/src/orxonox/objects
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/objects/Ambient.cc
r1638 r1653 65 65 66 66 bool Ambient::create(){ 67 GraphicsEngine::get Singleton().getLevelSceneManager()->setAmbientLight(ambientLight_);67 GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(ambientLight_); 68 68 return Synchronisable::create(); 69 69 } … … 76 76 void Ambient::setAmbientLight(const ColourValue& colour) 77 77 { 78 GraphicsEngine::get Singleton().getLevelSceneManager()->setAmbientLight(colour);78 GraphicsEngine::getInstance().getLevelSceneManager()->setAmbientLight(colour); 79 79 ambientLight_=colour; 80 80 } -
code/branches/gui/src/orxonox/objects/Backlight.cc
r1638 r1653 58 58 this->attachObject(this->billboard_.getBillboardSet()); 59 59 60 this->ribbonTrail_ = GraphicsEngine::get Singleton().getLevelSceneManager()->createRibbonTrail(this->getName() + "RibbonTrail");61 this->ribbonTrailNode_ = GraphicsEngine::get Singleton().getLevelSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName() + "RibbonTrailNode");60 this->ribbonTrail_ = GraphicsEngine::getInstance().getLevelSceneManager()->createRibbonTrail(this->getName() + "RibbonTrail"); 61 this->ribbonTrailNode_ = GraphicsEngine::getInstance().getLevelSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName() + "RibbonTrailNode"); 62 62 this->ribbonTrailNode_->attachObject(this->ribbonTrail_); 63 63 this->ribbonTrail_->addNode(this->getNode()); … … 76 76 { 77 77 this->detachObject(this->billboard_.getBillboardSet()); 78 GraphicsEngine::get Singleton().getLevelSceneManager()->destroySceneNode(this->getName() + "RibbonTrailNode");79 GraphicsEngine::get Singleton().getLevelSceneManager()->destroyRibbonTrail(this->ribbonTrail_);78 GraphicsEngine::getInstance().getLevelSceneManager()->destroySceneNode(this->getName() + "RibbonTrailNode"); 79 GraphicsEngine::getInstance().getLevelSceneManager()->destroyRibbonTrail(this->ribbonTrail_); 80 80 } 81 81 } -
code/branches/gui/src/orxonox/objects/Camera.cc
r1638 r1653 52 52 { 53 53 this->bHasFocus_ = false; 54 this->cameraNode_ = GraphicsEngine::get Singleton().getLevelSceneManager()->getRootSceneNode()->createChildSceneNode(node->getName() + "Camera");54 this->cameraNode_ = GraphicsEngine::getInstance().getLevelSceneManager()->getRootSceneNode()->createChildSceneNode(node->getName() + "Camera"); 55 55 if( node != NULL ) 56 56 this->setPositionNode(node); … … 60 60 { 61 61 CameraHandler::getInstance()->releaseFocus(this); 62 GraphicsEngine::get Singleton().getLevelSceneManager()->getRootSceneNode()->removeAndDestroyChild(cameraNode_->getName());62 GraphicsEngine::getInstance().getLevelSceneManager()->getRootSceneNode()->removeAndDestroyChild(cameraNode_->getName()); 63 63 } 64 64 -
code/branches/gui/src/orxonox/objects/CameraHandler.cc
r1640 r1653 44 44 CameraHandler::CameraHandler() 45 45 { 46 this->cam_ = GraphicsEngine::get Singleton().getLevelSceneManager()->createCamera("Cam");47 GraphicsEngine::get Singleton().getViewport()->setCamera(this->cam_);48 //GraphicsEngine::get Singleton().getRenderWindow()->addViewport(this->cam_, 2, 0.4, 0.4, 0.2, 0.2);46 this->cam_ = GraphicsEngine::getInstance().getLevelSceneManager()->createCamera("Cam"); 47 GraphicsEngine::getInstance().getViewport()->setCamera(this->cam_); 48 //GraphicsEngine::getInstance().getRenderWindow()->addViewport(this->cam_, 2, 0.4, 0.4, 0.2, 0.2); 49 49 /*this->activeCamera_ = *ObjectList<Camera>::begin(); 50 50 this->activeCamera_->cam_ = this->cam_;*/ -
code/branches/gui/src/orxonox/objects/ParticleSpawner.cc
r1638 r1653 79 79 this->setPosition(this->getNode()->getParent()->getPosition()); 80 80 this->getNode()->getParent()->removeChild(this->getNode()); 81 GraphicsEngine::get Singleton().getLevelSceneManager()->getRootSceneNode()->addChild(this->getNode());81 GraphicsEngine::getInstance().getLevelSceneManager()->getRootSceneNode()->addChild(this->getNode()); 82 82 if (this->particle_) 83 83 this->particle_->setEnabled(false); -
code/branches/gui/src/orxonox/objects/Skybox.cc
r1638 r1653 56 56 void Skybox::setSkybox(const std::string& skyboxname) 57 57 { 58 GraphicsEngine::get Singleton().getLevelSceneManager()->setSkyBox(true, skyboxname);58 GraphicsEngine::getInstance().getLevelSceneManager()->setSkyBox(true, skyboxname); 59 59 } 60 60 … … 92 92 { 93 93 BaseObject::changedVisibility(); 94 GraphicsEngine::get Singleton().getLevelSceneManager()->setSkyBox(this->isVisible(), this->skyboxSrc_);94 GraphicsEngine::getInstance().getLevelSceneManager()->setSkyBox(this->isVisible(), this->skyboxSrc_); 95 95 } 96 96 } -
code/branches/gui/src/orxonox/objects/WorldEntity.cc
r1638 r1653 49 49 RegisterObject(WorldEntity); 50 50 51 if (GraphicsEngine::get Singleton().getLevelSceneManager())51 if (GraphicsEngine::getInstance().getLevelSceneManager()) 52 52 { 53 53 std::ostringstream name; 54 54 name << (WorldEntity::worldEntityCounter_s++); 55 55 this->setName("WorldEntity" + name.str()); 56 this->node_ = GraphicsEngine::get Singleton().getLevelSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());56 this->node_ = GraphicsEngine::getInstance().getLevelSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName()); 57 57 58 58 registerAllVariables(); … … 77 77 { 78 78 this->getNode()->removeAndDestroyAllChildren(); 79 GraphicsEngine::get Singleton().getLevelSceneManager()->destroySceneNode(this->getName());79 GraphicsEngine::getInstance().getLevelSceneManager()->destroySceneNode(this->getName()); 80 80 } 81 81 } … … 178 178 void WorldEntity::attachObject(const WorldEntity& obj) const 179 179 { 180 GraphicsEngine::get Singleton().getLevelSceneManager()->getRootSceneNode()->removeChild(obj.getNode());180 GraphicsEngine::getInstance().getLevelSceneManager()->getRootSceneNode()->removeChild(obj.getNode()); 181 181 this->getNode()->addChild(obj.getNode()); 182 182 } … … 184 184 void WorldEntity::attachObject(WorldEntity* obj) const 185 185 { 186 GraphicsEngine::get Singleton().getLevelSceneManager()->getRootSceneNode()->removeChild(obj->getNode());186 GraphicsEngine::getInstance().getLevelSceneManager()->getRootSceneNode()->removeChild(obj->getNode()); 187 187 this->getNode()->addChild(obj->getNode()); 188 188 }
Note: See TracChangeset
for help on using the changeset viewer.