Changeset 3860 in orxonox.OLD for orxonox/trunk/src/lib/coord
- Timestamp:
- Apr 17, 2005, 6:20:02 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/p_node.cc
r3832 r3860 22 22 #include "p_node.h" 23 23 #include "stdincl.h" 24 #include "compiler.h" 24 25 25 26 #include "error.h" … … 61 62 *this->absCoordinate = absCoordinate; 62 63 63 __LIKELY_IF(parent != NULL)64 if (likely(parent != NULL)) 64 65 { 65 66 *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor (); … … 208 209 { 209 210 210 __UNLIKELY_IF( this->bAbsCoorChanged)211 if( unlikely(this->bAbsCoorChanged)) 211 212 { 212 213 *this->absCoordinate = *this->absCoordinate + shift; … … 316 317 void PNode::addChild (PNode* pNode, int parentingMode) 317 318 { 318 __LIKELY_IF( pNode->parent != NULL)319 if( likely(pNode->parent != NULL)) 319 320 { 320 321 PRINTF(3)("PNode::addChild() - reparenting node: removing it and adding it again\n"); … … 436 437 437 438 438 __LIKELY_IF( this->mode & PNODE_MOVEMENT)439 if( likely(this->mode & PNODE_MOVEMENT)) 439 440 { 440 __UNLIKELY_IF(this->bAbsCoorChanged/*&& this->timeStamp != DataTank::timeStamp*/)441 if( unlikely(this->bAbsCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/) 441 442 { 442 443 /* if you have set the absolute coordinates this overrides all other changes */ 443 444 *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor (); 444 445 } 445 __LIKELY_IF(this->bRelCoorChanged/*&& this->timeStamp != DataTank::timeStamp*/)446 if( likely(this->bRelCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/) 446 447 447 448 { … … 449 450 450 451 /* 451 __UNLIKELY_IF( this->parent == NULL)452 if( unlikely(this->parent == NULL)) 452 453 { 453 454 *this->absCoordinate = *this->relCoordinate; … … 460 461 if( this->mode & PNODE_LOCAL_ROTATE) 461 462 { 462 __UNLIKELY_IF( this->bAbsDirChanged/*&& this->timeStamp != DataTank::timeStamp*/)463 if( unlikely(this->bAbsDirChanged) /*&& this->timeStamp != DataTank::timeStamp*/) 463 464 { 464 465 /* if you have set the absolute coordinates this overrides all other changes */ 465 466 *this->relDirection = *this->absDirection - parent->getAbsDir(); 466 467 } 467 else __LIKELY_IF( this->bRelDirChanged/*&& this->timeStamp != DataTank::timeStamp*/)468 else if( likely(this->bRelDirChanged) /*&& this->timeStamp != DataTank::timeStamp*/) 468 469 { 469 470 /* update the current absDirection - remember * means rotation around sth.*/ … … 474 475 if( this->mode & PNODE_ROTATE_MOVEMENT) 475 476 { 476 __UNLIKELY_IF( this->bAbsCoorChanged/*&& this->timeStamp != DataTank::timeStamp*/)477 if( unlikely(this->bAbsCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/) 477 478 { 478 479 /* if you have set the absolute coordinates this overrides all other changes */ 479 480 *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor (); 480 481 } 481 else __LIKELY_IF( this->bRelCoorChanged/*&& this->timeStamp != DataTank::timeStamp*/)482 else if( likely(this->bRelCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/) 482 483 { 483 484 /*this is bad style... must be deleted later - just for testing*/ … … 496 497 { 497 498 /* if this node has changed, make sure, that all children are updated also */ 498 __LIKELY_IF( this->bRelCoorChanged || this->bAbsCoorChanged)499 if( likely(this->bRelCoorChanged || this->bAbsCoorChanged)) 499 500 pn->parentCoorChanged (); 500 __LIKELY_IF( this->bRelDirChanged || this->bAbsDirChanged)501 if( likely(this->bRelDirChanged || this->bAbsDirChanged)) 501 502 pn->parentDirChanged (); 502 503
Note: See TracChangeset
for help on using the changeset viewer.