Changeset 10237 in orxonox.OLD for branches/playability/src/world_entities/camera.cc
- Timestamp:
- Jan 15, 2007, 11:51:37 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/camera.cc
r9869 r10237 44 44 45 45 this->setParentMode(PNODE_ALL); 46 this->eventHandling = true; 47 48 46 49 } 47 50 … … 100 103 default: 101 104 case Camera::ViewNormal: 105 { 102 106 this->toFovy = 60.0; 103 107 this->setRelCoorSoft(-10, 5, 0); 104 108 this->target->setRelCoorSoft(0,0,0); 105 109 break; 110 } 106 111 case Camera::ViewBehind: 107 112 break; 108 113 case Camera::ViewFront: 114 { 109 115 this->toFovy = 120.0; 110 116 this->setRelCoorSoft(4, 0, 0, 5); 111 117 this->target->setRelCoorSoft(Vector(10,0,0), 5); 112 118 break; 119 } 113 120 case Camera::ViewLeft: 121 { 114 122 this->toFovy = 90; 115 123 this->setRelCoorSoft(0, 1, -10, .5); 116 124 this->target->setRelCoorSoft(0,0,0); 117 125 break; 126 } 118 127 case Camera::ViewRight: 128 { 119 129 this->toFovy = 90; 120 130 this->setRelCoorSoft(Vector(0, 1, 10)); 121 131 this->target->setRelCoorSoft(0,0,0); 122 132 break; 133 } 123 134 case Camera::ViewTop: 135 { 124 136 this->toFovy= 120; 125 this->setRelCoorSoft(Vector(30, 50, 0)); 126 this->target->setRelCoorSoft(35,0,0); 137 this->setRelCoor(Vector(-0.05, 40, 0)); 138 this->target->setRelCoor(0,0,0); 139 } 127 140 } 128 141 } … … 192 205 void Camera::process(const Event &event) 193 206 { 194 if ( event.type == KeyMapper::PEV_VIEW0)207 if (eventHandling == true) 195 208 { 196 this->setViewMode(Camera::ViewNormal); 197 } 198 else if( event.type == KeyMapper::PEV_VIEW1) 199 { 200 this->setViewMode(Camera::ViewBehind); 201 } 202 else if( event.type == KeyMapper::PEV_VIEW2) 203 { 204 this->setViewMode(Camera::ViewFront); 205 } 206 else if( event.type == KeyMapper::PEV_VIEW3) 207 { 208 this->setViewMode(Camera::ViewLeft); 209 } 210 else if( event.type == KeyMapper::PEV_VIEW4) 211 { 212 this->setViewMode(Camera::ViewRight); 213 } 214 else if( event.type == KeyMapper::PEV_VIEW5) 215 { 216 this->setViewMode(Camera::ViewTop); 209 if( event.type == KeyMapper::PEV_VIEW0) 210 { 211 this->setViewMode(Camera::ViewNormal); 212 } 213 else if( event.type == KeyMapper::PEV_VIEW1) 214 { 215 this->setViewMode(Camera::ViewBehind); 216 } 217 else if( event.type == KeyMapper::PEV_VIEW2) 218 { 219 this->setViewMode(Camera::ViewFront); 220 } 221 else if( event.type == KeyMapper::PEV_VIEW3) 222 { 223 this->setViewMode(Camera::ViewLeft); 224 } 225 else if( event.type == KeyMapper::PEV_VIEW4) 226 { 227 this->setViewMode(Camera::ViewRight); 228 } 229 else if( event.type == KeyMapper::PEV_VIEW5) 230 { 231 this->setViewMode(Camera::ViewTop); 232 } 217 233 } 218 234 }
Note: See TracChangeset
for help on using the changeset viewer.