Changeset 4448 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Jun 1, 2005, 10:55:53 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/coord
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/helper_parent.cc
r4320 r4448 25 25 /** 26 26 \brief standard constructor 27 28 \todo this constructor is not jet implemented - do it29 27 */ 30 28 HelperParent::HelperParent () … … 36 34 /** 37 35 \brief standard deconstructor 38 39 \todo this deconstructor is not jet implemented - do it40 36 */ 41 37 HelperParent::~HelperParent () -
orxonox/trunk/src/lib/coord/helper_parent.h
r3607 r4448 12 12 13 13 14 14 //! The HelperParent is a PNode that acts as a Helper. 15 15 class HelperParent : public PNode { 16 16 -
orxonox/trunk/src/lib/coord/null_parent.cc
r4444 r4448 24 24 NullParent* NullParent::singletonRef = 0; 25 25 26 /** 27 \returns the Reference to the NullParent 28 */ 26 29 NullParent* NullParent::getInstance () 27 30 { … … 31 34 } 32 35 36 /** 37 \brief creates the one and only NullParent 38 \param absCoordinate the cordinate of the Parent (normally Vector(0,0,0)) 39 */ 33 40 NullParent::NullParent (const Vector& absCoordinate) : PNode (absCoordinate, NULL) 34 41 { 42 this->setClassID(CL_NULL_PARENT, "NullParent"); 35 43 this->setName("NullParent"); 36 this->setClassID(CL_NULL_PARENT, "NullParent"); 44 45 this->setParentMode(PNODE_ALL); 37 46 NullParent::singletonRef = this; 38 this->setParentMode(PNODE_ALL);39 47 } 40 48 … … 42 50 /** 43 51 \brief standard deconstructor 44 45 \todo this deconstructor is not jet implemented - do it46 52 */ 47 53 NullParent::~NullParent () 48 54 { 49 55 //delete singletonRef; 50 singletonRef = NULL;56 NullParent::singletonRef = NULL; 51 57 } -
orxonox/trunk/src/lib/coord/null_parent.h
r4441 r4448 1 1 /*! 2 \file proto_class.h3 \brief Definition of the proto class template, used quickly start work2 \file null_parent.h 3 \brief Definition of the NullParent, the higest PNode of them all. 4 4 */ 5 5 … … 8 8 #define _NULL_PARENT_H 9 9 10 11 10 #include "p_node.h" 12 11 13 12 //! The top joint of all PNode's every PNode is somehow connected to this one. 14 13 class NullParent : public PNode { 15 14 … … 18 17 virtual ~NullParent (); 19 18 19 private: 20 NullParent (const Vector& absCoordinate = Vector()); 20 21 21 22 private: 22 NullParent (const Vector& absCoordinate = Vector()); 23 static NullParent* singletonRef; 23 static NullParent* singletonRef; //!< A reference to the NullParent 24 24 25 25 }; -
orxonox/trunk/src/lib/coord/p_node.cc
r4444 r4448 39 39 /** 40 40 \brief standard constructor 41 42 \todo this constructor is not jet implemented - do it43 41 */ 44 42 PNode::PNode () … … 49 47 } 50 48 49 /** 50 \param root the load-Element for the PNode 51 */ 51 52 PNode::PNode(const TiXmlElement* root) 52 53 { … … 94 95 } 95 96 97 /** 98 \brief initializes a PNode 99 \param parent the parent for this PNode 100 */ 96 101 void PNode::init(PNode* parent) 97 102 { … … 104 109 } 105 110 111 /** 112 \brief loads parameters of the PNode 113 \param root the XML-element to load the properties of 114 */ 106 115 void PNode::loadParams(const TiXmlElement* root) 107 116 { 108 117 static_cast<BaseObject*>(this)->loadParams(root); 109 118 } 110 111 /**112 \brief get relative coordinates113 \returns relative coordinates to its parent114 115 the reference that is returned is a pointer to the real relCoor, so don't116 change it unless you realy know what you are doing.117 */118 //Vector* PNode::getRelCoor () const119 120 121 119 122 120 /** … … 128 126 has changed and won't update the children Nodes. 129 127 */ 130 /*131 void PNode::setRelCoor (Vector* relCoord)132 {133 this->bRelCoorChanged = true;134 *this->relCoordinate = *relCoord;135 }136 */137 138 139 /**140 \brief set relative coordinates141 \param relCoord relative coordinates to its parent142 143 it is very importand, that you use this function, if you want to update the144 relCoordinates. If you don't use this, the PNode won't recognize, that something145 has changed and won't update the children Nodes.146 */147 128 void PNode::setRelCoor (const Vector& relCoord) 148 129 { … … 150 131 this->relCoordinate = relCoord; 151 132 } 152 153 154 /**155 \brief get absolute coordinates156 \returns absolute coordinates from (0,0,0)157 */158 //Vector PNode::getAbsCoor () const159 160 161 162 163 133 164 134 /** … … 175 145 } 176 146 177 178 147 /** 179 148 \brief shift coordinate (abs and rel) 180 \param shift vector149 \param shift shift vector 181 150 182 151 this function shifts the current coordinates about the vector shift. this is … … 210 179 } 211 180 212 213 214 /**215 \brief get relative direction216 \returns relative direction to its parent217 */218 //Quaternion* PNode::getRelDir () const219 220 221 222 181 /** 223 182 \brief set relative direction … … 234 193 } 235 194 236 237 /**238 \brief gets the absolute direction (0,0,1)239 \returns absolute coordinates240 */241 //Quaternion PNode::getAbsDir () const242 243 244 245 195 /** 246 196 \brief sets the absolute direction (0,0,1) … … 256 206 this->absDirection = absDir; 257 207 } 258 259 260 208 261 209 /** … … 289 237 \brief adds a child and makes this node to a parent 290 238 \param pNode child reference 291 \param mode on which changes the child should also change ist state239 \param parentMode on which changes the child should also change ist state 292 240 293 241 use this to add a child to this node. … … 304 252 this->children->add(pNode); 305 253 } 306 307 254 308 255 /** … … 354 301 /** 355 302 \brief set the mode of this parent manualy 356 \param mode the mode of the bind-type.303 \param parentMode the mode of the bind-type. 357 304 */ 358 305 void PNode::setParentMode (unsigned int parentMode) … … 375 322 */ 376 323 377 378 /**379 \brief has to be called, if the parent direction has changed380 381 normaly this will be done by the parent itself automaticaly. If you call this, you382 will force an update of the direction of the node.383 */384 /*385 void PNode::parentDirChanged ()386 {387 this->bRelDirChanged = true;388 }389 */390 391 392 324 /** 393 325 \brief updates the absCoordinate/absDirection 394 \param timeStamp The timestanp used for to look if calculations should be done326 \param dt The time passed since the last update 395 327 396 328 this is used to go through the parent-tree to update all the absolute coordinates … … 512 444 } 513 445 514 515 /**516 \brief tick517 \param dt time to tick518 */519 void PNode::processTick (float dt)520 {521 //this->tick (dt);522 /*523 PNode* pn = this->children->enumerate();524 while( pn != NULL)525 {526 pn->processTick (dt);527 pn = this->children->nextElement();528 }529 */530 }531 532 533 446 /** 534 447 \brief displays some information about this pNode -
orxonox/trunk/src/lib/coord/p_node.h
r4444 r4448 61 61 inline const Vector& getRelCoor () const { return this->relCoordinate; }; 62 62 void setAbsCoor (const Vector& absCoord); 63 /** \retu ns the absolute position */63 /** \returns the absolute position */ 64 64 inline const Vector& getAbsCoor () const { return this->absCoordinate; }; 65 65 void shiftCoor (const Vector& shift); … … 89 89 void setParent (PNode* parent); 90 90 void setParentMode (unsigned int parentingMode); 91 /** \returns the Parenting mode of this node */ 91 92 int getParentMode() const { return this->parentMode; }; 92 93 93 94 void update (float dt); 94 void processTick (float dt);95 95 96 96 void debug (); … … 99 99 private: 100 100 void init(PNode* parent); 101 /** \brief tells the child that the parent's Coordinate has changed */ 101 102 inline void parentCoorChanged () { this->bRelCoorChanged = true; } 103 /** \brief tells the child that the parent's Direction has changed */ 102 104 inline void parentDirChanged () { this->bRelDirChanged = true; } 103 105 /** \returns the last calculated coordinate */ -
orxonox/trunk/src/lib/coord/pilot_node.cc
r4443 r4448 14 14 main-programmer: Patrick Boenzli 15 15 co-programmer: ... 16 17 bensch: added comments 16 18 */ 17 19 … … 23 25 using namespace std; 24 26 25 26 27 /** 27 28 \brief standard constructor 28 29 \todo this constructor is not jet implemented - do it30 29 */ 31 30 PilotNode::PilotNode () … … 38 37 } 39 38 40 41 39 /** 42 40 \brief standard deconstructor 43 44 \todo this deconstructor is not jet implemented - do it45 41 */ 46 42 PilotNode::~PilotNode () … … 49 45 } 50 46 51 47 /** 48 \brief ticks the node 49 \param time the time about whitch to tick \ 50 */ 52 51 void PilotNode::tick(float time) 53 52 { … … 97 96 } 98 97 99 98 /** 99 \brief handles events 100 \param event the event that occured 101 */ 100 102 void PilotNode::process( const Event &event) 101 103 { -
orxonox/trunk/src/lib/coord/pilot_node.h
r4443 r4448 1 1 /*! 2 \file helper_parent.h3 \brief this is a parent class, that isn't visible in the real world itself2 \file pilot_node.h 3 \brief Definition of a PilotNode 4 4 */ 5 5 … … 13 13 class Event; 14 14 15 //! The PilotNode is a node that enables the is driven by the Mouse 15 16 class PilotNode : public WorldEntity, public EventListener { 16 17 … … 19 20 virtual ~PilotNode (); 20 21 21 v oid tick(float time);22 virtual void tick(float time); 22 23 23 v oid process(const Event &event);24 virtual void process(const Event &event); 24 25 25 26 private: … … 27 28 28 29 private: 29 bool bUp;//!< up button pressed.30 bool bDown;//!< down button pressed.31 bool bLeft;//!< left button pressed.32 bool bRight;//!< right button pressed.30 bool bUp; //!< up button pressed. 31 bool bDown; //!< down button pressed. 32 bool bLeft; //!< left button pressed. 33 bool bRight; //!< right button pressed. 33 34 34 int pitch;35 int roll;35 int pitch; //!< the pitch of the node 36 int roll; //!< the roll of the node 36 37 37 Vector* velocity; //!< the velocity of the player.38 float travelSpeed;//!< the current speed of the player (to make soft movement)39 float acceleration;//!< the acceleration of the player.38 Vector* velocity; //!< the velocity of the player. 39 float travelSpeed; //!< the current speed of the player (to make soft movement) 40 float acceleration; //!< the acceleration of the player. 40 41 41 42
Note: See TracChangeset
for help on using the changeset viewer.