Changeset 5050 in orxonox.OLD for orxonox/trunk/src/lib/coord
- Timestamp:
- Aug 16, 2005, 10:17:20 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
r5041 r5050 563 563 { 564 564 /* update the current absDirection - remember * means rotation around sth.*/ 565 this->prevRelCoordinate = this->relCoordinate; 565 566 this->absDirection = this->relDirection * parent->getAbsDir();; 566 567 } … … 569 570 { 570 571 /* update the current absCoordinate */ 572 this->prevRelCoordinate = this->relCoordinate; 571 573 this->absCoordinate = this->parent->getAbsCoor() + this->relCoordinate; 572 574 } … … 574 576 { 575 577 /* update the current absCoordinate */ 578 this->prevRelDirection = this->relDirection; 576 579 this->absCoordinate = this->parent->getAbsCoor() + parent->getAbsDir().apply(this->relCoordinate); 577 580 } -
orxonox/trunk/src/lib/coord/p_node.h
r5008 r5050 65 65 void setRelCoorSoft(float x, float y, float z, float bias = 1.0); 66 66 /** @returns the relative position */ 67 inline const Vector& getRelCoor () const { return this-> relCoordinate; };67 inline const Vector& getRelCoor () const { return this->prevRelCoordinate; }; 68 68 void setAbsCoor (const Vector& absCoord); 69 69 void setAbsCoor (float x, float y, float z); … … 77 77 void setRelDirSoft(float x, float y, float z, float bias = 1.0); 78 78 /** @returns the relative Direction */ 79 inline const Quaternion& getRelDir () const { return this-> relDirection; };79 inline const Quaternion& getRelDir () const { return this->prevRelDirection; }; 80 80 /** @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)); }; 82 82 void setAbsDir (const Quaternion& absDir); 83 83 void setAbsDir (float x, float y, float z); … … 141 141 Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) ) 142 142 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 143 148 Vector velocity; //!< Saves the velocity. 144 Vector lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate145 146 149 147 150 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.