Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10116 in orxonox.OLD for branches/camera/src/world_entities


Ignore:
Timestamp:
Dec 20, 2006, 12:24:39 AM (18 years ago)
Author:
gfilip
Message:

good night

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

Legend:

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

    r10110 r10116  
    307307  rotateBy.y=0;
    308308  rotateBy.z=0;
    309 
     309  //target=State::getCamera()->getTargetNode();
    310310
    311311}
     
    315315{
    316316  glLoadIdentity();
     317
     318//Movemet
    317319  State::getCameraNode()->setParentSoft(PNode::getNullParent());
    318   //State::getCameraTargetNode()->setParentSoft(this);
     320
     321//LookAt
     322 // State::getCameraTargetNode()->setParentSoft(PNode::getNullParent());
    319323}
    320324
     
    322326{
    323327  State::getCameraNode()->setParentSoft(object);
     328  State::getCameraTargetNode()->setParentSoft(object);
    324329}
    325330
     
    345350    Vector tmpVec= iterate(dt,  &translateTo,  &(State::getCameraNode()->getAbsCoor()));
    346351    glLoadIdentity();
    347     glTranslatef(tmpVec.x, tmpVec.y, tmpVec.z);
     352    //glTranslatef(
     353    State::getCamera()->getTargetNode()->setAbsCoor(tmpVec.x, tmpVec.y, tmpVec.z);
    348354  }
    349355}
     
    374380void CameraTarget::test()
    375381{
    376 //Vector* vec=new Vector(100,100,100);
    377   //translateNow(vec);
    378   glMatrixMode (GL_PROJECTION);
    379   glLoadIdentity();
    380   glTranslatef(100, 100, 100);
    381 }
     382Vector* vec=new Vector(5000,5000,5000);
     383  translateNow(vec);
     384  //glMatrixMode (GL_MODELVIEW);
     385  //glLoadIdentity();
     386  //glTranslatef(100, 100, 100);
     387 // State::getCamera()->getTargetNode()->setRelCoor(100,100,100);
     388}
     389
     390
     391
     392
     393
  • branches/camera/src/world_entities/camera.h

    r10110 r10116  
    1010#include "event_listener.h"
    1111#include "plane.h"
     12//#include "targets.h"
    1213
    1314class World;
    1415class CameraTarget;
    1516class Event;
    16 
    1717
    1818//! Camera
     
    9494  virtual ~CameraTarget() {}
    9595  float speed;
     96  PNode* target;
    9697
    9798public:
     
    110111
    111112
     113
     114
    112115#endif /* _CAMERA_H */
     116
Note: See TracChangeset for help on using the changeset viewer.