Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10093 in orxonox.OLD for branches/camera


Ignore:
Timestamp:
Dec 18, 2006, 9:54:46 PM (18 years ago)
Author:
gfilip
Message:

iterations

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

Legend:

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

    r10068 r10093  
    320320void CameraTarget::detach()
    321321{
    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
     327void CameraTarget::atach(PNode* object)
     328{
     329  State::getCameraNode()->setParentSoft(object);
     330}
     331
     332
     333float 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
     346Vector* Camera::translate(Vector* newPos, float speed)
     347{
     348glTranslatef(Vector);
     349
     350}
     351
     352
     353
  • branches/camera/src/world_entities/camera.h

    r10068 r10093  
    9696public:
    9797  void detach();
     98  void atach(PNode* object);
     99  float iterate(float dt, Vector target, PNode* cam);
     100  Vector* translate(Vector* newPos, float speed);
    98101};
    99102
Note: See TracChangeset for help on using the changeset viewer.