Changeset 3638 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Mar 23, 2005, 1:12:35 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/camera.cc
r3636 r3638 57 57 } 58 58 59 /** 60 \returns The PNode of the Target (from there you can get position and so on 61 */ 59 62 PNode* Camera::getTarget(void) 60 63 { … … 92 95 } 93 96 94 95 96 97 97 /** 98 98 \brief initialize rendering perspective according to this camera … … 116 116 Vector cameraPosition = this->getAbsCoor(); 117 117 Vector targetPosition = this->target->getAbsCoor(); 118 Vector up = Vector(0, 1, 0); 119 up = this->getAbsDir().apply(up); 118 120 119 121 // Setting the Camera Eye, lookAt and up Vectors 120 122 gluLookAt(cameraPosition.x, cameraPosition.y, cameraPosition.z, 121 123 targetPosition.x, targetPosition.y, targetPosition.z, 122 0.0, 1.0, 0.0);124 up.x, up.y, up.z); 123 125 124 126 // switching back to Modeling Matrix … … 135 137 CameraTarget::CameraTarget() 136 138 { 137 139 this->setMode(PNODE_MOVEMENT); 138 140 } 139 141
Note: See TracChangeset
for help on using the changeset viewer.