Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6616 in orxonox.OLD for trunk/src/lib/coord


Ignore:
Timestamp:
Jan 19, 2006, 12:27:45 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: taken the quaternion outside of Vector.cc to quaternion.cc/h

Location:
trunk/src/lib/coord
Files:
2 edited

Legend:

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

    r6512 r6616  
    214214
    215215  *this->toCoordinate = relCoordSoft;
     216  this->toStep = 0.0f;
    216217  this->bias = bias;
    217218}
     
    299300      *this->toCoordinate = absCoordSoft;
    300301  }
     302  this->toStep = 0.0f;
    301303}
    302304
     
    370372  *this->toDirection = relDirSoft;
    371373  this->bias = bias;
     374  this->toStep = 0.0f;
    372375  this->bRelDirChanged = true;
    373376}
     
    439442
    440443  this->bias = bias;
     444  this->toStep = 0.0f;
    441445  this->bRelDirChanged = true;
    442446}
     
    614618  }
    615619  this->bias = bias;
    616 
     620  this->toStep = 0.0f;
    617621
    618622  Vector tmpV = this->getAbsCoor();
     
    743747        if (unlikely(this->toDirection != NULL))
    744748        {
    745           Quaternion rotQuat = Quaternion::quatSlerp(this->relDirection,*this->toDirection, fabsf(dt)*this->bias);
     749          this->toStep += fabs(dt) * bias;
     750          printf("%s::%s %f\n", this->getClassName(), this->getName(), this->toStep );
     751          Quaternion rotQuat = Quaternion::quatSlerp(this->relDirection,*this->toDirection, toStep);
    746752          if (this->relDirection.distance(rotQuat) >PNODE_ITERATION_DELTA)
    747753          {
  • trunk/src/lib/coord/p_node.h

    r6512 r6616  
    2424
    2525#include "vector.h"
     26#include "quaternion.h"
    2627#include <list>
    2728
     
    218219  Quaternion*        toDirection;        //!< a direction to which to iterate. (This is used in conjunction with setParentSoft and set*DirSoft)
    219220  float              bias;               //!< how fast to iterate to the given position (default is 1)
     221  float              toStep;
    220222
    221223  PNode*             parent;             //!< a pointer to the parent node.
Note: See TracChangeset for help on using the changeset viewer.