- Timestamp:
- Mar 23, 2009, 11:26:46 AM (16 years ago)
- Location:
- code/branches/miniprojects/src/orxonox/objects/worldentities
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/miniprojects/src/orxonox/objects/worldentities/CMakeLists.txt
r2768 r2824 20 20 SpawnPoint.cc 21 21 TeamSpawnPoint.cc 22 PongCenterpoint.cc 23 PongBall.cc 24 PongBat.cc 22 25 ) 23 26 -
code/branches/miniprojects/src/orxonox/objects/worldentities/CameraPosition.cc
r2662 r2824 44 44 this->bDrag_ = false; 45 45 this->bAllowMouseLook_ = false; 46 this->bAbsolute_ = false; 46 47 47 48 this->setObjectMode(0x0); … … 58 59 XMLPortParam(CameraPosition, "drag", setDrag, getDrag, xmlelement, mode).defaultValues(false); 59 60 XMLPortParam(CameraPosition, "mouselook", setAllowMouseLook, getAllowMouseLook, xmlelement, mode).defaultValues(false); 61 XMLPortParam(CameraPosition, "absolute", setIsAbsolute, getIsAbsolute, xmlelement, mode).defaultValues(false); 60 62 } 61 63 -
code/branches/miniprojects/src/orxonox/objects/worldentities/CameraPosition.h
r2662 r2824 54 54 { return this->bAllowMouseLook_; } 55 55 56 inline void setIsAbsolute(bool bAbsolute) 57 { this->bAbsolute_ = bAbsolute; } 58 inline bool getIsAbsolute() const 59 { return this->bAbsolute_; } 60 56 61 void attachCamera(Camera* camera); 57 62 … … 59 64 bool bDrag_; 60 65 bool bAllowMouseLook_; 66 bool bAbsolute_; 61 67 }; 62 68 } -
code/branches/miniprojects/src/orxonox/objects/worldentities/ControllableEntity.cc
r2662 r2824 144 144 void ControllableEntity::addCameraPosition(CameraPosition* position) 145 145 { 146 if (position->getAllowMouseLook()) 147 position->attachToNode(this->cameraPositionRootNode_); 146 if (!position->getIsAbsolute()) 147 { 148 if (position->getAllowMouseLook()) 149 position->attachToNode(this->cameraPositionRootNode_); 150 else 151 this->attach(position); 152 } 148 153 else 149 this->attach(position); 154 { 155 WorldEntity* parent = this->getParent(); 156 if (parent) 157 parent->attach(position); 158 } 150 159 this->cameraPositions_.push_back(position); 151 160 }
Note: See TracChangeset
for help on using the changeset viewer.