Changeset 2073 for code/branches/objecthierarchy
- Timestamp:
- Oct 31, 2008, 1:27:44 AM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox
- Files:
-
- 6 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/CMakeLists.txt
r2071 r2073 1 1 SET( ORXONOX_SRC_FILES 2 Camera Handler.cc2 CameraManager.cc 3 3 GraphicsEngine.cc 4 4 LevelManager.cc … … 106 106 GraphicsEngine.cc 107 107 objects/Camera.cc 108 objects/CameraHandler.cc108 CameraManager.cc 109 109 ) 110 110 -
code/branches/objecthierarchy/src/orxonox/CameraManager.cc
r2070 r2073 23 23 * Benjamin Knecht 24 24 * Co-authors: 25 * ...25 * Fabian 'x3n' Landau 26 26 * 27 27 */ 28 28 #include "OrxonoxStableHeaders.h" 29 #include "Camera Handler.h"29 #include "CameraManager.h" 30 30 31 31 #include <OgreViewport.h> … … 37 37 namespace orxonox 38 38 { 39 Camera Handler* CameraHandler::singletonRef_s = 0;39 CameraManager* CameraManager::singletonRef_s = 0; 40 40 41 Camera Handler::CameraHandler(Ogre::Viewport* viewport)41 CameraManager::CameraManager(Ogre::Viewport* viewport) 42 42 : viewport_(viewport) 43 43 { … … 46 46 } 47 47 48 Camera Handler::~CameraHandler()48 CameraManager::~CameraManager() 49 49 { 50 50 assert(singletonRef_s != 0); … … 52 52 } 53 53 54 Camera* Camera Handler::getActiveCamera() const54 Camera* CameraManager::getActiveCamera() const 55 55 { 56 56 if (this->cameraList_.size() > 0) … … 60 60 } 61 61 62 void Camera Handler::requestFocus(Camera* camera)62 void CameraManager::requestFocus(Camera* camera) 63 63 { 64 64 if (!Core::showsGraphics()) … … 81 81 } 82 82 83 void Camera Handler::releaseFocus(Camera* camera)83 void CameraManager::releaseFocus(Camera* camera) 84 84 { 85 85 if (!Core::showsGraphics()) -
code/branches/objecthierarchy/src/orxonox/CameraManager.h
r2070 r2073 23 23 * Benjamin Knecht 24 24 * Co-authors: 25 * ...25 * Fabian 'x3n' Landau 26 26 * 27 27 */ 28 28 29 29 /** 30 @file Camera Handler.h30 @file CameraManager.h 31 31 @brief Handles the instances of Camera class 32 32 @author Benjamin Knecht <beni_at_orxonox.net> 33 33 */ 34 34 35 #ifndef _Camera _Handler_H__36 #define _Camera _Handler_H__35 #ifndef _CameraManager_H__ 36 #define _CameraManager_H__ 37 37 38 38 #include "OrxonoxPrereqs.h" … … 44 44 namespace orxonox 45 45 { 46 class _OrxonoxExport Camera Handler46 class _OrxonoxExport CameraManager 47 47 { 48 48 public: 49 Camera Handler(Ogre::Viewport* viewport);50 ~Camera Handler();49 CameraManager(Ogre::Viewport* viewport); 50 ~CameraManager(); 51 51 52 52 Camera* getActiveCamera() const; … … 55 55 void releaseFocus(Camera* camera); 56 56 57 static Camera Handler& getInstance() { assert(singletonRef_s); return *singletonRef_s; }57 static CameraManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; } 58 58 59 59 private: 60 Camera Handler(const CameraHandler&);60 CameraManager(const CameraManager&); 61 61 62 62 std::list<Camera*> cameraList_; 63 63 Ogre::Viewport* viewport_; 64 64 65 static Camera Handler* singletonRef_s;65 static CameraManager* singletonRef_s; 66 66 }; 67 67 } 68 68 69 #endif /* _Camera _Handler_H__ */69 #endif /* _CameraManager_H__ */ -
code/branches/objecthierarchy/src/orxonox/OrxonoxPrereqs.h
r2065 r2073 80 80 class RadarListener; 81 81 82 class Camera Handler;82 class CameraManager; 83 83 class LevelManager; 84 84 … … 107 107 class Pawn; 108 108 class SpaceShip; 109 110 class Trigger; 111 class DistanceTrigger; 112 class EventTrigger; 109 113 110 114 class Controller; -
code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.cc
r2034 r2073 44 44 #include "objects/Radar.h" 45 45 //#include "tools/ParticleInterface.h" 46 #include "Camera Handler.h"46 #include "CameraManager.h" 47 47 #include "LevelManager.h" 48 48 #include "Settings.h" … … 57 57 , radar_(0) 58 58 , startFile_(0) 59 , camera Handler_(0)59 , cameraManager_(0) 60 60 , levelManager_(0) 61 61 { … … 82 82 inputState_->setHandler(keyBinder_); 83 83 84 // create the global Camera Handler84 // create the global CameraManager 85 85 assert(viewport); 86 this->camera Handler_ = new CameraHandler(viewport);86 this->cameraManager_ = new CameraManager(viewport); 87 87 88 88 // Start the Radar … … 146 146 delete this->radar_; 147 147 148 if (this->camera Handler_)149 delete this->camera Handler_;148 if (this->cameraManager_) 149 delete this->cameraManager_; 150 150 151 151 if (this->levelManager_) -
code/branches/objecthierarchy/src/orxonox/gamestates/GSLevel.h
r2023 r2073 68 68 Radar* radar_; //!< represents the Radar (not the HUD part) 69 69 XMLFile* startFile_; //!< current hard coded default level 70 Camera Handler* cameraHandler_;70 CameraManager* cameraManager_; 71 71 LevelManager* levelManager_; 72 72 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Camera.cc
r2030 r2073 41 41 #include "core/ConfigValueIncludes.h" 42 42 #include "objects/Scene.h" 43 #include "Camera Handler.h"43 #include "CameraManager.h" 44 44 45 45 namespace orxonox … … 102 102 void Camera::requestFocus() 103 103 { 104 Camera Handler::getInstance().requestFocus(this);104 CameraManager::getInstance().requestFocus(this); 105 105 } 106 106 107 107 void Camera::releaseFocus() 108 108 { 109 Camera Handler::getInstance().releaseFocus(this);109 CameraManager::getInstance().releaseFocus(this); 110 110 } 111 111 112 112 /** 113 113 what to do when camera loses focus (do not request focus in this function!!) 114 this is called by the Camera Handler singleton class to notify the camera114 this is called by the CameraManager singleton class to notify the camera 115 115 */ 116 116 void Camera::removeFocus() -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Camera.h
r2027 r2073 40 40 class _OrxonoxExport Camera : public PositionableEntity, public Tickable 41 41 { 42 friend class Camera Handler;42 friend class CameraManager; 43 43 44 44 public:
Note: See TracChangeset
for help on using the changeset viewer.