Changeset 6765 in orxonox.OLD for branches/network/src
- Timestamp:
- Jan 26, 2006, 12:11:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/world_entities/camera.cc
r6426 r6765 178 178 /** 179 179 * initialize rendering perspective according to this camera 180 181 182 183 */180 * 181 * This is called immediately before the rendering cycle starts, it sets all global 182 * rendering options as well as the GL_PROJECTION matrix according to the camera. 183 */ 184 184 void Camera::apply () 185 185 { … … 193 193 this->nearClip, 194 194 this->farClip); 195 196 195 // speed-up feature 197 196 Vector cameraPosition = this->getAbsCoor(); 198 197 Vector targetPosition = this->target->getAbsCoor(); 199 198 Vector up = this->getAbsDirV(); 200 Vector delay = Vector(0,0,0); 201 if( currentMode != VIEW_FRONT) delay = (this->target->getVelocity())/25; 199 Vector delay = Vector(0, 0, 0); 200 if( currentMode != VIEW_FRONT) delay = (this->target->getVelocity()) / 25.0f; 201 202 glMatrixMode (GL_MODELVIEW); 203 glLoadIdentity(); 204 202 205 203 206 // Setting the Camera Eye, lookAt and up Vectors … … 205 208 targetPosition.x, targetPosition.y, targetPosition.z, 206 209 up.x, up.y, up.z); 207 208 // switching back to Modeling Matrix209 glMatrixMode (GL_MODELVIEW);210 // this->target->getParent()->getParent()->debugDraw(0, 2, Vector(1,0,0));211 210 } 212 211
Note: See TracChangeset
for help on using the changeset viewer.