Changeset 4993 in orxonox.OLD for orxonox/trunk/src/lib/coord/p_node.h
- Timestamp:
- Aug 13, 2005, 11:56:31 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.h
r4992 r4993 1 1 /*! 2 \file p_node.h2 @file p_node.h 3 3 * Definition of a parenting node 4 4 … … 55 55 PNode (); 56 56 PNode(const TiXmlElement* root); 57 PNode (const Vector& absCoor dinate, PNode* pNode);57 PNode (const Vector& absCoor, PNode* pNode); 58 58 virtual ~PNode (); 59 59 … … 89 89 90 90 /** @returns the Speed of the Node */ 91 inline float getSpeed() const { return this->velocity.len();}91 inline float getSpeed() const { return this->velocity.len(); }; 92 92 /** @returns the Velocity of the Node */ 93 inline const Vector& getVelocity() const { return this->velocity;}93 inline const Vector& getVelocity() const { return this->velocity; }; 94 94 95 95 96 void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE);96 void addChild (PNode* child, int parentingMode = DEFAULT_MODE); 97 97 void addChild (const char* childName); 98 void removeChild (PNode* pNode);98 void removeChild (PNode* child); 99 99 void remove(); 100 100 … … 107 107 void softReparent(const char* parentName, float bias = 1.0); 108 108 109 void setParentMode (PARENT_MODE parentMode); 109 /** @param parentMode sets the parentingMode of this Node */ 110 void setParentMode (PARENT_MODE parentMode) { this->parentMode = parentMode; }; 110 111 void setParentMode (const char* parentingMode); 111 112 /** @returns the Parenting mode of this node */ … … 117 118 void debugDraw(float size = 1.0) const; 118 119 120 121 // helper functions // 122 static const char* parentingModeToChar(int parentingMode); 123 static PARENT_MODE charToParentingMode(const char* parentingMode); 119 124 private: 120 125 void init(PNode* parent); … … 124 129 inline void parentDirChanged () { this->bRelDirChanged = true; } 125 130 /** @returns the last calculated coordinate */ 126 inline Vector getLastAbsCoor() { return this->lastAbsCoordinate;}131 inline Vector getLastAbsCoor() { return this->lastAbsCoordinate; } 127 132 128 133 129 134 private: 130 bool bAbsCoorChanged; //!< If Absolute Coordinate has changed since last time we checked131 135 bool bRelCoorChanged; //!< If Relative Coordinate has changed since last time we checked 132 bool bAbsDirChanged; //!< If Absolute Direction has changed since last time we checked133 136 bool bRelDirChanged; //!< If Relative Direction has changed since last time we checked 134 137 … … 142 145 143 146 144 Vector* to Position;//!< a position to which to iterate. (This is used in conjunction with softReparent.and set*CoorSoft)147 Vector* toCoordinate; //!< a position to which to iterate. (This is used in conjunction with softReparent.and set*CoorSoft) 145 148 Quaternion* toDirection; //!< a direction to which to iterate. (This is used in conjunction with softReparent and set*DirSoft) 146 149 float bias; //!< how fast to iterate to the given position (default is 1)
Note: See TracChangeset
for help on using the changeset viewer.