Changeset 5000 in orxonox.OLD for orxonox/trunk/src/lib/coord
- Timestamp:
- Aug 13, 2005, 9:07:56 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/coord
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.cc
r4998 r5000 483 483 parentNode->addChild(this); 484 484 485 /*if (this->parentMode & PNODE_ROTATE_MOVEMENT)486 this->setRelCoor(parent->getRelDir().apply(tmpV -parent->getAbsCoor()));487 else*/488 this->setRelCoor(tmpV - parentNode->getAbsCoor());485 if (this->parentMode & PNODE_ROTATE_MOVEMENT) 486 this->setRelCoor(this->parent->getAbsDir().inverse().apply(tmpV - this->parent->getAbsCoor())); 487 else 488 this->setRelCoor(tmpV - parentNode->getAbsCoor()); 489 489 490 490 this->setRelDir(tmpQ / parentNode->getAbsDir()); … … 542 542 if (unlikely(this->toDirection != NULL)) 543 543 { 544 Quaternion rotQuat = Quaternion(.1, Vector(0,1,0));// (*this->toDirection / this->relDirection);544 Quaternion rotQuat = (*this->toDirection / this->relDirection)*dt; 545 545 // printf("1: "); 546 546 // this->relDirection.debug(); 547 547 // printf("2: "); 548 548 // this->toDirection->debug(); 549 //printf("3: ");550 // rotQuat.debug();551 552 if ( true)//likely(rotQuat.len() >= .001))549 //printf("3: "); 550 //rotQuat.debug2(); 551 552 if (likely(rotQuat.getSpacialAxisAngle() >= .01)) 553 553 { 554 554 this->shiftDir(rotQuat); … … 556 556 else 557 557 { 558 delete this->to Coordinate;559 this->to Coordinate= NULL;560 PRINTF(5)("Smooth Move of %s finished\n", this->getName());558 delete this->toDirection; 559 this->toDirection = NULL; 560 PRINTF(5)("SmoothRotate of %s finished\n", this->getName()); 561 561 } 562 562 } -
orxonox/trunk/src/lib/coord/p_node.h
r4993 r5000 26 26 27 27 // FORWARD DEFINITION \\ 28 class PNode; /* forward decleration, so that parentEntry has access to PNode */29 //class Quaternion;30 //class Vector;31 28 class TiXmlElement; 32 29 template<class T> class tList;
Note: See TracChangeset
for help on using the changeset viewer.