Changeset 10094 in orxonox.OLD for branches/camera/src/world_entities
- Timestamp:
- Dec 18, 2006, 10:42:56 PM (18 years ago)
- Location:
- branches/camera/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camera/src/world_entities/camera.cc
r10093 r10094 309 309 310 310 311 Vector itarateTo(0,0,0); 312 313 311 314 CameraTarget::CameraTarget() 312 315 { … … 331 334 332 335 333 float CameraTarget::iterate(float dt, Vector target, PNode*cam)336 float CameraTarget::iterate(float dt, Vector target, Vector cam) 334 337 { 335 338 Vector tmpVec; 336 339 337 tmpVec= ( cam->getAbsCorr() - target);340 tmpVec= (target - cam); 338 341 339 342 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 343 344 return 0;//tmpVec * fabsf(dt); 345 346 } 347 348 349 Vector* CameraTarget::translate(Vector* newPos, float speed) 350 { 351 //glTranslatef(Vector); 352 353 } 354 355 356 -
branches/camera/src/world_entities/camera.h
r10093 r10094 97 97 void detach(); 98 98 void atach(PNode* object); 99 float iterate(float dt, Vector target, PNode*cam);99 float iterate(float dt, Vector target, Vector cam); 100 100 Vector* translate(Vector* newPos, float speed); 101 101 };
Note: See TracChangeset
for help on using the changeset viewer.