Changeset 2913 for code/branches/map/src/orxonox/objects/worldentities
- Timestamp:
- Apr 9, 2009, 4:52:36 PM (16 years ago)
- Location:
- code/branches/map/src/orxonox/objects/worldentities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/map/src/orxonox/objects/worldentities/CameraPosition.cc
r2662 r2913 30 30 #include "CameraPosition.h" 31 31 32 #include <OgreCamera.h> 33 32 34 #include "core/CoreIncludes.h" 33 35 #include "core/XMLPort.h" … … 44 46 this->bDrag_ = false; 45 47 this->bAllowMouseLook_ = false; 48 this->bRenderCamera_ = false; 46 49 47 50 this->setObjectMode(0x0); … … 58 61 XMLPortParam(CameraPosition, "drag", setDrag, getDrag, xmlelement, mode).defaultValues(false); 59 62 XMLPortParam(CameraPosition, "mouselook", setAllowMouseLook, getAllowMouseLook, xmlelement, mode).defaultValues(false); 63 XMLPortParam(CameraPosition, "rendercamera", setRenderCamera, getRenderCamera, xmlelement, mode).defaultValues(false); 60 64 } 61 65 … … 70 74 camera->setDrag(true); 71 75 } 76 77 void CameraPosition::attachCamera(Ogre::Camera* camera) 78 { 79 this->attachOgreObject(camera); 80 } 72 81 } -
code/branches/map/src/orxonox/objects/worldentities/CameraPosition.h
r2662 r2913 54 54 { return this->bAllowMouseLook_; } 55 55 56 inline void setRenderCamera(bool bRenderCamera) 57 { this->bRenderCamera_ = bRenderCamera; } 58 inline bool getRenderCamera() const 59 { return this->bRenderCamera_; } 60 56 61 void attachCamera(Camera* camera); 62 void attachCamera(Ogre::Camera* camera); 57 63 58 64 private: 59 65 bool bDrag_; 60 66 bool bAllowMouseLook_; 67 bool bRenderCamera_; 61 68 }; 62 69 } -
code/branches/map/src/orxonox/objects/worldentities/ControllableEntity.cc
r2662 r2913 62 62 this->hud_ = 0; 63 63 this->camera_ = 0; 64 this->reverseCamera_ = 0; 64 65 this->bDestroyWhenPlayerLeft_ = false; 65 66 this->cameraPositionRootNode_ = this->node_->createChildSceneNode(); … … 148 149 else 149 150 this->attach(position); 150 this->cameraPositions_.push_back(position); 151 152 if (!position->getRenderCamera()) 153 this->cameraPositions_.push_back(position); 154 else 155 this->setReverseCamera(position); 151 156 } 152 157 -
code/branches/map/src/orxonox/objects/worldentities/ControllableEntity.h
r2662 r2913 109 109 inline const std::string& getCameraPositionTemkplate() const 110 110 { return this->cameraPositionTemplate_; } 111 112 inline void setReverseCamera(CameraPosition* camera) 113 { this->reverseCamera_ = camera; } 114 inline CameraPosition* getReverseCamera() const 115 { return this->reverseCamera_; } 111 116 112 117 using WorldEntity::setPosition; … … 188 193 std::list<CameraPosition*> cameraPositions_; 189 194 std::string cameraPositionTemplate_; 195 CameraPosition* reverseCamera_; 190 196 191 197 const GametypeInfo* gtinfo_;
Note: See TracChangeset
for help on using the changeset viewer.