Changeset 10093 in orxonox.OLD for branches/camera
- Timestamp:
- Dec 18, 2006, 9:54:46 PM (18 years ago)
- Location:
- branches/camera/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camera/src/world_entities/camera.cc
r10068 r10093 320 320 void CameraTarget::detach() 321 321 { 322 State::getCameraTargetNode()->setParentSoft(Null); 323 } 324 325 326 327 328 322 glLoadIdentity(); 323 State::getCameraNode()->setParentSoft(PNode::getNullParent()); 324 //State::getCameraTargetNode()->setParentSoft(this); 325 } 326 327 void CameraTarget::atach(PNode* object) 328 { 329 State::getCameraNode()->setParentSoft(object); 330 } 331 332 333 float CameraTarget::iterate(float dt, Vector target, PNode* cam) 334 { 335 Vector tmpVec; 336 337 tmpVec= (cam->getAbsCorr() - target); 338 339 if (tmpVec.x >= 0.01) 340 float ret = cam->getAbsCorr(); 341 ret += tmpVec * fabsf(dt); 342 return ret; 343 } 344 345 346 Vector* Camera::translate(Vector* newPos, float speed) 347 { 348 glTranslatef(Vector); 349 350 } 351 352 353 -
branches/camera/src/world_entities/camera.h
r10068 r10093 96 96 public: 97 97 void detach(); 98 void atach(PNode* object); 99 float iterate(float dt, Vector target, PNode* cam); 100 Vector* translate(Vector* newPos, float speed); 98 101 }; 99 102
Note: See TracChangeset
for help on using the changeset viewer.