Changeset 4178 in orxonox.OLD for orxonox/branches/physics/src/lib/coord/p_node.h
- Timestamp:
- May 13, 2005, 11:16:33 PM (20 years ago)
- Location:
- orxonox/branches/physics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics
- Property svn:externals
-
old new 1 data http://svn.orxonox.ethz.ch/data 1
-
- Property svn:externals
-
orxonox/branches/physics/src/lib/coord/p_node.h
r3813 r4178 57 57 58 58 59 inline Vector*getRelCoor () const { return this->relCoordinate; }59 inline const Vector& getRelCoor () const { return this->relCoordinate; } 60 60 void setRelCoor (const Vector& relCoord); 61 inline Vector getAbsCoor () const { return *this->absCoordinate; }61 inline const Vector& getAbsCoor () const { return this->absCoordinate; } 62 62 void setAbsCoor (const Vector& absCoord); 63 63 void shiftCoor (const Vector& shift); 64 64 65 inline Quaternion getRelDir () const { return *this->relDirection; }65 inline const Quaternion& getRelDir () const { return this->relDirection; } 66 66 void setRelDir (const Quaternion& relDir); 67 inline Quaternion getAbsDir () const { return *this->absDirection; }67 inline const Quaternion& getAbsDir () const { return this->absDirection; } 68 68 void setAbsDir (const Quaternion& absDir); 69 69 void shiftDir (const Quaternion& shift); 70 70 71 float getSpeed() const; 71 /** \returns the Speed of the Node */ 72 inline float getSpeed() const {return this->velocity.len()/1000;} //! \FIX THIS SHOULD NOT BE /1000 73 /** \returns the Velocity of the Node */ 74 inline const Vector& getVelocity() const {return this->velocity;} 72 75 73 76 void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE); … … 85 88 void processTick (float dt); 86 89 87 void setName (c har* newName);88 c har* getName ();90 void setName (const char* newName); 91 const char* getName (); 89 92 90 93 … … 99 102 bool bRelDirChanged; //!< If Relative Direction has changed since last time we checked 100 103 101 Vector *relCoordinate; //!< coordinates relative to the parent102 Vector *absCoordinate; //!< absolute coordinates in the world ( from (0,0,0) )103 Quaternion *relDirection; //!< direction relative to the parent104 Quaternion *absDirection; //!< absolute direvtion in the world ( from (0,0,1) )104 Vector relCoordinate; //!< coordinates relative to the parent 105 Vector absCoordinate; //!< absolute coordinates in the world ( from (0,0,0) ) 106 Quaternion relDirection; //!< direction relative to the parent 107 Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) ) 105 108 106 109 int mode; //!< the mode of the binding … … 109 112 void init(PNode* parent); 110 113 111 Vector* lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate 112 Vector* diffCoordinate; //!< this is stored here for performance reasons, difference to the last vector 113 float time; //!< time since last update 114 Vector velocity; //!< Saves the velocity. 115 Vector lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate 114 116 }; 115 117
Note: See TracChangeset
for help on using the changeset viewer.