Changeset 4987 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Aug 12, 2005, 4:12:15 PM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/camera.cc
r4986 r4987 36 36 { 37 37 this->setClassID(CL_CAMERA, "Camera"); 38 this->setName("camera"); 38 39 this->target = new CameraTarget(); 39 40 … … 50 51 51 52 this->setViewMode(VIEW_NORMAL); 53 54 this->setParentMode(PNODE_MOVEMENT); 52 55 } 53 56 … … 116 119 case VIEW_NORMAL: 117 120 this->toFovy = 60.0; 118 this->toRelCoor = Vector(-10, 5, 0); 121 this->setRelCoorSoft(Vector(-10, 5, 0)); 122 this->target->setRelCoorSoft(Vector(0,0,0)); 119 123 break; 120 124 case VIEW_BEHIND: 121 this->toFovy = 120.0; 122 this->toRelCoor = Vector(3.5, 0, 0); 123 this->target->setRelCoor(4,0,0); 124 /* this->setParent("main-Turret"); 125 // this->toFovy = 120.0; 126 this->setRelCoorSoft(Vector(3.5, 0, 0)); 127 this->target->setRelCoorSoft(Vector(10,0,0)); 128 129 /*this->target->softReparent("main-Turret"); 130 this->setParent("main-Turret"); 125 131 this->setParentMode(PNODE_ALL); 126 132 this->target->setParent("Crosshair");*/ … … 128 134 case VIEW_FRONT: 129 135 this->toFovy = 95.0; 130 this->toRelCoor = Vector(12, 5, 0); 136 this->setRelCoorSoft(Vector(10, 2, 0)); 137 this->target->setRelCoorSoft(Vector(0,0,0)); 131 138 break; 132 139 case VIEW_LEFT: 133 140 this->toFovy = 90; 134 this->toRelCoor = Vector(0, 2, -10); 141 this->setRelCoorSoft(Vector(0, 1, -10)); 142 this->target->setRelCoorSoft(Vector(0,0,0)); 135 143 break; 136 144 case VIEW_RIGHT: 137 145 this->toFovy = 90; 138 this->toRelCoor = Vector(0, 2, 10); 146 this->setRelCoorSoft(Vector(0, 1, 10)); 147 this->target->setRelCoorSoft(Vector(0,0,0)); 139 148 break; 140 149 case VIEW_TOP: 141 150 this->toFovy= 120; 142 this->toRelCoor = Vector(0, 4, 0); 151 this->setRelCoorSoft(Vector(0, 10, 0)); 152 this->target->setRelCoorSoft(Vector(0,0,0)); 143 153 } 144 154 } … … 154 164 if (tmpFovy > .001) 155 165 this->fovy += (this->toFovy - this->fovy) * dt; 156 Vector tmpPos = (this->toRelCoor - this->getRelCoor()) * dt;157 if (tmpPos.len() >= .001)158 {159 tmpPos = tmpPos + this->getRelCoor();160 this->setRelCoor(tmpPos);161 }162 166 } 163 167 -
orxonox/trunk/src/world_entities/camera.h
r4986 r4987 57 57 float farClip; //!< The far clipping plane. 58 58 59 Vector toRelCoor; //!< The relativeCoordinate to move the camera to.60 59 float toFovy; //!< The fovy-mode to iterate to. 61 60 };
Note: See TracChangeset
for help on using the changeset viewer.