Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5001 in orxonox.OLD for orxonox/trunk/src/lib/coord/p_node.cc


Ignore:
Timestamp:
Aug 13, 2005, 10:08:47 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: update-setRelDir works correctly now :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/coord/p_node.cc

    r5000 r5001  
    337337void PNode::setAbsDir (const Quaternion& absDir)
    338338{
    339   if (this->parent)
    340     this->relDirection = absDir / parent->getAbsDir();
     339  if (likely(this->parent != NULL))
     340    this->relDirection = absDir / this->parent->getAbsDir();
    341341  else
    342     this->relDirection = absDir;
     342   this->relDirection = absDir;
    343343
    344344  this->bRelDirChanged = true;
    345 //  this->absDirection = absDir;
    346345}
    347346
     
    576575      {
    577576        /* update the current absDirection - remember * means rotation around sth.*/
    578         this->absDirection = parent->getAbsDir() * this->relDirection;
     577        this->absDirection = this->relDirection * parent->getAbsDir();;
    579578      }
    580579
Note: See TracChangeset for help on using the changeset viewer.