Changeset 3371 in orxonox.OLD for orxonox/branches/trackManager/src/track_manager.cc
- Timestamp:
- Jan 7, 2005, 3:07:12 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/trackManager/src/track_manager.cc
r3369 r3371 19 19 #include "track_manager.h" 20 20 #include <stdarg.h> 21 21 #include "p_node.h" 22 22 23 23 using namespace std; … … 111 111 this->maxTime = 0; 112 112 this->trackElemCount = 1; 113 this->bindSlave = NULL; 113 114 } 114 115 … … 440 441 void TrackManager::tick(float dt) 441 442 { 443 dt /= 1000; 444 printf("LocalTime is: %f, timestep is: %f\n", this->localTime, dt); 442 445 if (this->localTime <= this->firstTrackElem->duration) 443 446 this->jumpTo(this->localTime); 447 printf("LocalTime is: %f, timestep is: %f\n", this->localTime, dt); 444 448 this->localTime += dt; 445 449 if (this->localTime > this->currentTrackElem->startingTime + this->currentTrackElem->duration && this->currentTrackElem->childCount > 0) 446 450 this->currentTrackElem = this->currentTrackElem->children[0]; 451 if (this->bindSlave) 452 { 453 Vector tmp = this->calcPos(); 454 Quaternion quat = Quaternion(this->calcDir(), Vector(0,1,0)); 455 this->bindSlave->setAbsCoor(&tmp); 456 this->bindSlave->setAbsDir(&quat); 457 } 447 458 } 448 459 … … 471 482 } 472 483 484 /** 485 \brief Sets the PNode, that should be moved along the Tack 486 \param bindSlave the PNode to set 487 */ 488 void TrackManager::setBindSlave(PNode* bindSlave) 489 { 490 if (!this->bindSlave) 491 this->bindSlave = bindSlave; 492 } 473 493 474 494
Note: See TracChangeset
for help on using the changeset viewer.