Changeset 4444 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Jun 1, 2005, 10:17:14 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/coord
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/null_parent.cc
r4441 r4444 26 26 NullParent* NullParent::getInstance () 27 27 { 28 if(! singletonRef)29 singletonRef = new NullParent ();30 return singletonRef;28 if(!NullParent::singletonRef) 29 NullParent::singletonRef = new NullParent (); 30 return NullParent::singletonRef; 31 31 } 32 32 … … 35 35 this->setName("NullParent"); 36 36 this->setClassID(CL_NULL_PARENT, "NullParent"); 37 singletonRef = this;38 this->set Mode(PNODE_ALL);37 NullParent::singletonRef = this; 38 this->setParentMode(PNODE_ALL); 39 39 } 40 40 -
orxonox/trunk/src/lib/coord/p_node.cc
r4440 r4444 52 52 { 53 53 this->init(NULL); 54 this->loadParams(root); 55 54 56 NullParent::getInstance()->addChild(this); 55 57 } … … 291 293 use this to add a child to this node. 292 294 */ 293 void PNode::addChild (PNode* pNode, int parent ingMode)295 void PNode::addChild (PNode* pNode, int parentMode) 294 296 { 295 297 if( likely(pNode->parent != NULL)) … … 298 300 pNode->parent->children->remove(pNode); 299 301 } 300 pNode-> mode = parentingMode;302 pNode->parentMode = parentMode; 301 303 pNode->parent = this; 302 304 this->children->add(pNode); … … 332 334 while( pn != NULL) 333 335 { 334 nullParent->addChild(pn, pn->get Mode());336 nullParent->addChild(pn, pn->getParentMode()); 335 337 pn = iterator->nextElement(); 336 338 } … … 354 356 \param mode the mode of the bind-type. 355 357 */ 356 void PNode::setMode (int parentingMode) 357 { 358 this->mode = parentingMode; 359 } 360 361 362 /** 363 \brief gets the mode of this parent manualy 364 \return the mode of the bind-type. 365 */ 366 int PNode::getMode() const 367 { 368 return this->mode; 358 void PNode::setParentMode (unsigned int parentMode) 359 { 360 this->parentMode = parentMode; 369 361 } 370 362 … … 415 407 416 408 417 if( likely(this-> mode & PNODE_MOVEMENT))409 if( likely(this->parentMode & PNODE_MOVEMENT)) 418 410 { 419 411 if( unlikely(this->bAbsCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/) … … 437 429 } 438 430 439 if( this-> mode & PNODE_LOCAL_ROTATE)431 if( this->parentMode & PNODE_LOCAL_ROTATE) 440 432 { 441 433 if( unlikely(this->bAbsDirChanged) /*&& this->timeStamp != DataTank::timeStamp*/) … … 451 443 } 452 444 453 if( this-> mode & PNODE_ROTATE_MOVEMENT)445 if( this->parentMode & PNODE_ROTATE_MOVEMENT) 454 446 { 455 447 if( unlikely(this->bAbsCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/) -
orxonox/trunk/src/lib/coord/p_node.h
r4440 r4444 88 88 89 89 void setParent (PNode* parent); 90 void set Mode (int parentingMode);91 int get Mode() const;90 void setParentMode (unsigned int parentingMode); 91 int getParentMode() const { return this->parentMode; }; 92 92 93 93 void update (float dt); … … 122 122 tList<PNode>* children; //!< list of the children 123 123 124 unsigned int mode;//!< the mode of the binding124 unsigned int parentMode; //!< the mode of the binding 125 125 }; 126 126
Note: See TracChangeset
for help on using the changeset viewer.