Changeset 2636 in orxonox.OLD for orxonox/trunk/src/camera.cc
- Timestamp:
- Oct 25, 2004, 12:48:39 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/camera.cc
r2551 r2636 27 27 This standard constructor sets all parameters to zero 28 28 */ 29 Camera::Camera () 30 { 29 Camera::Camera (World* world) 30 { 31 this->world = world; 31 32 bound = NULL; 32 33 /* give it some physical live */ … … 36 37 fs = new Vector(0.0, 0.0, 0.0); 37 38 cameraMode = NORMAL; 38 39 39 deltaTime = 3000.0; 40 40 cameraOffset = 1.0; … … 179 179 /* the camera is handled like an entity and rolls on the track */ 180 180 case NORMAL: 181 Orxonox *orx = Orxonox::getInstance();182 181 Location lookat; 183 if( bound != NULL )182 if( bound != NULL && world != NULL ) 184 183 { 185 184 bound->get_lookat (&lookat); 186 orx->get_world()->calc_camera_pos (&lookat, &desired_place);185 world->calc_camera_pos (&lookat, &desired_place); 187 186 } 188 187 else … … 293 292 } 294 293 } 294 295 296 void Camera::setWorld(World* world) 297 { 298 this->world = world; 299 }
Note: See TracChangeset
for help on using the changeset viewer.