Changeset 4832 in orxonox.OLD for orxonox/trunk/src/world_entities/camera.cc
- Timestamp:
- Jul 11, 2005, 5:45:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/camera.cc
r4746 r4832 1 1 2 2 3 /* 3 /* 4 4 orxonox - the future of 3D-vertical-scrollers 5 5 … … 127 127 this->toRelCoor = Vector(12, 5, 0); 128 128 break; 129 case VIEW_LEFT: 129 case VIEW_LEFT: 130 130 this->toFovy = 90; 131 131 this->toRelCoor = Vector(0, 2, -10); … … 148 148 void Camera::tick(float dt) 149 149 { 150 dt /= 500;151 150 float tmpFovy = (this->toFovy - this->fovy) * dt; 152 151 if (tmpFovy > .001) … … 163 162 /** 164 163 \brief initialize rendering perspective according to this camera 165 164 166 165 This is called immediately before the rendering cycle starts, it sets all global 167 166 rendering options as well as the GL_PROJECTION matrix according to the camera. … … 175 174 // setting up the perspective 176 175 gluPerspective(this->fovy, 177 178 179 176 this->aspectRatio, 177 this->nearClip, 178 this->farClip); 180 179 181 180 // speed-up feature … … 187 186 // Setting the Camera Eye, lookAt and up Vectors 188 187 gluLookAt(cameraPosition.x, cameraPosition.y, cameraPosition.z, 189 190 188 targetPosition.x, targetPosition.y, targetPosition.z, 189 up.x, up.y, up.z); 191 190 192 191 // switching back to Modeling Matrix
Note: See TracChangeset
for help on using the changeset viewer.