Changeset 10116 in orxonox.OLD for branches/camera/src
- Timestamp:
- Dec 20, 2006, 12:24:39 AM (18 years ago)
- Location:
- branches/camera/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camera/src/world_entities/camera.cc
r10110 r10116 307 307 rotateBy.y=0; 308 308 rotateBy.z=0; 309 309 //target=State::getCamera()->getTargetNode(); 310 310 311 311 } … … 315 315 { 316 316 glLoadIdentity(); 317 318 //Movemet 317 319 State::getCameraNode()->setParentSoft(PNode::getNullParent()); 318 //State::getCameraTargetNode()->setParentSoft(this); 320 321 //LookAt 322 // State::getCameraTargetNode()->setParentSoft(PNode::getNullParent()); 319 323 } 320 324 … … 322 326 { 323 327 State::getCameraNode()->setParentSoft(object); 328 State::getCameraTargetNode()->setParentSoft(object); 324 329 } 325 330 … … 345 350 Vector tmpVec= iterate(dt, &translateTo, &(State::getCameraNode()->getAbsCoor())); 346 351 glLoadIdentity(); 347 glTranslatef(tmpVec.x, tmpVec.y, tmpVec.z); 352 //glTranslatef( 353 State::getCamera()->getTargetNode()->setAbsCoor(tmpVec.x, tmpVec.y, tmpVec.z); 348 354 } 349 355 } … … 374 380 void CameraTarget::test() 375 381 { 376 //Vector* vec=new Vector(100,100,100); 377 //translateNow(vec); 378 glMatrixMode (GL_PROJECTION); 379 glLoadIdentity(); 380 glTranslatef(100, 100, 100); 381 } 382 Vector* 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 10 10 #include "event_listener.h" 11 11 #include "plane.h" 12 //#include "targets.h" 12 13 13 14 class World; 14 15 class CameraTarget; 15 16 class Event; 16 17 17 18 18 //! Camera … … 94 94 virtual ~CameraTarget() {} 95 95 float speed; 96 PNode* target; 96 97 97 98 public: … … 110 111 111 112 113 114 112 115 #endif /* _CAMERA_H */ 116
Note: See TracChangeset
for help on using the changeset viewer.