Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10103 in orxonox.OLD for branches/camera


Ignore:
Timestamp:
Dec 19, 2006, 7:40:14 PM (18 years ago)
Author:
gfilip
Message:

just to be save ;)

Location:
branches/camera/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/camera/src/world_entities/camera.cc

    r10094 r10103  
    309309
    310310
    311 Vector itarateTo(0,0,0);
    312 
     311Vector translateTo(0,0,0);
     312Vector rotateBy(0,0,0);
     313float speed=1;
    313314
    314315CameraTarget::CameraTarget()
     
    334335
    335336
    336 float CameraTarget::iterate(float dt, Vector target, Vector cam)
    337 {
     337Vector CameraTarget::iterate(float dt, Vector* target, Vector* cam)
     338{
     339
     340  //this condititon if needed in tick:    if (tmpVec.x >= 0.01)
    338341  Vector tmpVec;
    339 
    340       tmpVec= (target - cam);
    341 
    342   if (tmpVec.x >= 0.01)
    343 
    344   return  0;//tmpVec * fabsf(dt);
     342  tmpVec= (*target - *cam);
     343  tmpVec.normalize();
     344  return  tmpVec;
    345345
    346346}
     
    354354
    355355
    356 
     356void CameraTarget::changeSpeed(float speed)
     357{
     358  if (speed!=0)
     359this->speed=speed;
     360  return;
     361}
  • branches/camera/src/world_entities/camera.h

    r10094 r10103  
    9797  void detach();
    9898  void atach(PNode* object);
    99   float iterate(float dt, Vector target, Vector cam);
     99  Vector iterate(float dt, Vector* target, Vector* cam);
    100100  Vector* translate(Vector* newPos, float speed);
     101  void changeSpeed(float speed);
    101102};
    102103
Note: See TracChangeset for help on using the changeset viewer.