Changeset 5420 in orxonox.OLD for trunk/src/lib/coord
- Timestamp:
- Oct 22, 2005, 1:57:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r5419 r5420 36 36 /** 37 37 * standard constructor 38 */38 */ 39 39 PNode::PNode () 40 40 { … … 46 46 /** 47 47 * @param root the load-Element for the PNode 48 */48 */ 49 49 PNode::PNode(const TiXmlElement* root) 50 50 { … … 60 60 * @param absCoordinate the Absolute coordinate of the Object 61 61 * @param parent The parent-node of this node. 62 */62 */ 63 63 PNode::PNode (const Vector& absCoor, PNode* parent ) 64 64 { … … 116 116 * initializes a PNode 117 117 * @param parent the parent for this PNode 118 */118 */ 119 119 void PNode::init(PNode* parent) 120 120 { … … 136 136 * loads parameters of the PNode 137 137 * @param root the XML-element to load the properties of 138 */138 */ 139 139 void PNode::loadParams(const TiXmlElement* root) 140 140 { … … 176 176 * set relative coordinates 177 177 * @param relCoord relative coordinates to its parent 178 179 it is very importand, that you use this function, if you want to update the 180 relCoordinates. If you don't use this, the PNode won't recognize, that something 181 has changed and won't update the children Nodes. 182 */ 178 * 179 * 180 * it is very importand, that you use this function, if you want to update the 181 * relCoordinates. If you don't use this, the PNode won't recognize, that something 182 * has changed and won't update the children Nodes. 183 */ 183 184 void PNode::setRelCoor (const Vector& relCoord) 184 185 { … … 199 200 * @param z z-relative coordinates to its parent 200 201 * @see void PNode::setRelCoor (const Vector& relCoord) 201 */202 */ 202 203 void PNode::setRelCoor (float x, float y, float z) 203 204 { … … 306 307 * shift coordinate relative 307 308 * @param shift shift vector 308 309 310 311 312 313 314 315 otherwise you would have to:316 317 318 319 320 309 * 310 * this function shifts the current coordinates about the vector shift. this is 311 * usefull because from some place else you can: 312 * PNode* someNode = ...; 313 * Vector objectMovement = calculateShift(); 314 * someNode->shiftCoor(objectMovement); 315 * 316 * this is the internal method of: 317 * PNode* someNode = ...; 318 * Vector objectMovement = calculateShift(); 319 * Vector currentCoor = someNode->getRelCoor(); 320 * Vector newCoor = currentCoor + objectMovement; 321 * someNode->setRelCoor(newCoor); 321 322 * 322 323 */ … … 417 418 418 419 /** 419 * 420 * sets the absolute direction 420 421 * @param absDir absolute coordinates 421 422 */ … … 461 462 * @param child child reference 462 463 * use this to add a child to this node. 463 */464 */ 464 465 void PNode::addChild (PNode* child) 465 466 { … … 491 492 * 492 493 * Children from pNode will not be lost, they are referenced to NullPointer 493 */494 */ 494 495 void PNode::removeChild (PNode* child) 495 496 { … … 504 505 /** 505 506 * remove this pnode from the tree and adds all following to NullParent 506 507 508 */507 * 508 * this can be the case, if an entity in the world is being destroyed. 509 */ 509 510 void PNode::remove() 510 511 { … … 525 526 * sets the parent of this PNode 526 527 * @param parent the Parent to set 527 */528 */ 528 529 void PNode::setParent (PNode* parent) 529 530 { … … 604 605 * updates the absCoordinate/absDirection 605 606 * @param dt The time passed since the last update 606 607 608 609 610 */607 * 608 * this is used to go through the parent-tree to update all the absolute coordinates 609 * and directions. this update should be done by the engine, so you don't have to 610 * worry, normaly... 611 */ 611 612 void PNode::update (float dt) 612 613 { … … 713 714 * (0: all children will be debugged, 1: only this PNode, 2: this and direct children, ...) 714 715 * @param level !! INTERNAL !! The n-th level of the Node we draw (this is internal and only for nice output). 715 */716 */ 716 717 void PNode::debug(unsigned int depth, unsigned int level) const 717 718 {
Note: See TracChangeset
for help on using the changeset viewer.