Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5050 in orxonox.OLD


Ignore:
Timestamp:
Aug 16, 2005, 10:17:20 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: now operating on previous (not last as AbsCoor, but absCoor) Relative coordinates and Directions

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

Legend:

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

    r5041 r5050  
    563563      {
    564564        /* update the current absDirection - remember * means rotation around sth.*/
     565        this->prevRelCoordinate = this->relCoordinate;
    565566        this->absDirection = this->relDirection * parent->getAbsDir();;
    566567      }
     
    569570      {
    570571        /* update the current absCoordinate */
     572        this->prevRelCoordinate = this->relCoordinate;
    571573        this->absCoordinate = this->parent->getAbsCoor() + this->relCoordinate;
    572574      }
     
    574576      {
    575577        /* update the current absCoordinate */
     578        this->prevRelDirection = this->relDirection;
    576579        this->absCoordinate = this->parent->getAbsCoor() + parent->getAbsDir().apply(this->relCoordinate);
    577580      }
  • orxonox/trunk/src/lib/coord/p_node.h

    r5008 r5050  
    6565  void setRelCoorSoft(float x, float y, float z, float bias = 1.0);
    6666  /** @returns the relative position */
    67   inline const Vector& getRelCoor () const { return this->relCoordinate; };
     67  inline const Vector& getRelCoor () const { return this->prevRelCoordinate; };
    6868  void setAbsCoor (const Vector& absCoord);
    6969  void setAbsCoor (float x, float y, float z);
     
    7777  void setRelDirSoft(float x, float y, float z, float bias = 1.0);
    7878  /** @returns the relative Direction */
    79   inline const Quaternion& getRelDir () const { return this->relDirection; };
     79  inline const Quaternion& getRelDir () const { return this->prevRelDirection; };
    8080  /** @returns a Vector pointing into the relative Direction */
    81   inline Vector getRelDirV() const { return this->relDirection.apply(Vector(0,1,0)); };
     81  inline Vector getRelDirV() const { return this->prevRelDirection.apply(Vector(0,1,0)); };
    8282  void setAbsDir (const Quaternion& absDir);
    8383  void setAbsDir (float x, float y, float z);
     
    141141  Quaternion      absDirection;       //!< absolute direvtion in the world ( from (0,0,1) )
    142142
     143  Vector          prevRelCoordinate;  //!< The last Relative Coordinate from the last update-Cycle.
     144  Vector          lastAbsCoordinate;  //!< this is used for speedcalculation, it stores the last coordinate
     145  Quaternion      prevRelDirection;   //!< The last Relative Direciton from the last update-Cycle.
     146//  Quaternion      lastAbsDirection;
     147
    143148  Vector          velocity;           //!< Saves the velocity.
    144   Vector          lastAbsCoordinate;  //!< this is used for speedcalculation, it stores the last coordinate
    145 
    146149
    147150  Vector*         toCoordinate;       //!< a position to which to iterate. (This is used in conjunction with softReparent.and set*CoorSoft)
Note: See TracChangeset for help on using the changeset viewer.