Changeset 3537 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Mar 14, 2005, 12:12:12 AM (20 years ago)
- Location:
- orxonox/trunk/src/lib/coord
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.cc
r3535 r3537 334 334 void PNode::removeChild (PNode* pNode) 335 335 { 336 /* 337 PNode* pn = this->children->enumerate(); 338 while( pn != NULL) 339 { 340 this->removeChild(pn); 341 np->addChild(pn, pn->getMode()); 342 pn = this->children->nextElement(); 343 } 344 345 */ 346 336 347 this->children->remove (pNode); 337 348 pNode->parent = NULL; … … 340 351 341 352 /** 353 \brief remove this pnode from the tree and adds all following to NullParent 354 355 this can be the case, if an entity in the world is been destroyed. 356 */ 357 void PNode::remove() 358 { 359 NullParent* np = NullParent::getInstance(); 360 PNode* pn = this->children->enumerate(); 361 while( pn != NULL) 362 { 363 this->children->remove(pn); 364 np->addChild(pn, pn->getMode()); 365 pn = this->children->nextElement(); 366 } 367 } 368 369 370 /** 342 371 \brief sets the parent of this PNode 343 372 \param parent the Parent to set … … 356 385 { 357 386 this->mode = mode; 387 } 388 389 390 /** 391 \brief gets the mode of this parent manualy 392 \return the mode of the bind-type. 393 */ 394 parentingMode PNode::getMode() 395 { 396 return this->mode; 358 397 } 359 398 -
orxonox/trunk/src/lib/coord/p_node.h
r3535 r3537 45 45 tList<PNode>* children; //!< list of the children 46 46 47 parentingMode mode; //!< the mode of the binding 47 48 48 49 49 Vector getRelCoor (); … … 65 65 void addChild (PNode* pNode, parentingMode mode); 66 66 void removeChild (PNode* pNode); 67 void remove(); 68 69 67 70 void setParent (PNode* parent); 68 71 void parentCoorChanged (); 69 72 void parentDirChanged (); 70 73 void setMode (parentingMode mode); 74 parentingMode getMode(); 71 75 72 76 virtual void update (float timeStamp); … … 95 99 Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) ) 96 100 101 parentingMode mode; //!< the mode of the binding 102 97 103 }; 98 104
Note: See TracChangeset
for help on using the changeset viewer.