Changeset 5118 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Aug 24, 2005, 2:45:46 AM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r5115 r5118 598 598 PRINTF(4)("NullParent::update - (%f, %f, %f)\n", this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 599 599 if (this->bRelCoorChanged) 600 { 601 this->prevRelCoordinate = this->relCoordinate; 600 602 this->absCoordinate = this->relCoordinate; 603 } 601 604 if (this->bRelDirChanged) 605 { 606 this->prevRelDirection = this->relDirection; 602 607 this->absDirection = this->getAbsDir () * this->relDirection; 608 } 603 609 } 604 610 -
trunk/src/lib/graphics/render2D/element_2d.cc
r5117 r5118 618 618 619 619 620 if( this->parentMode & PNODE_LOCAL_ROTATE && this->bRelDirChanged)620 if( this->parentMode & E2D_PARENT_LOCAL_ROTATE && this->bRelDirChanged) 621 621 { 622 622 /* update the current absDirection - remember * means rotation around sth.*/ … … 677 677 PRINTF(5)("Element2D::update - (%f, %f, %f)\n", this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z); 678 678 if (this->bRelCoorChanged) 679 { 680 this->prevRelCoordinate = this->relCoordinate; 679 681 this->absCoordinate = this->relCoordinate; 682 } 680 683 if (this->bRelDirChanged) 684 { 685 this->prevRelDirection = this->relDirection; 681 686 this->absDirection = this->getAbsDir2D() * this->relDirection; 687 } 682 688 } 683 689 -
trunk/src/lib/util/list.h
r5115 r5118 333 333 334 334 T* firstElement(); 335 T* lastElement(); 335 336 T* nextElement(); 337 T* prevElement(); 336 338 T* seekElement(T* element); 337 339 T* iteratorElement(const tIterator<T>* iterator); … … 375 377 inline tIterator<T>::~tIterator () 376 378 { 377 this->currentEl = NULL;378 379 } 379 380 … … 382 383 { 383 384 this->currentEl = this->list->first; 384 if (this->currentEl == NULL) 385 return NULL; 386 else 385 if (this->currentEl != NULL) 387 386 return this->currentEl->curr; 387 else 388 return NULL; 389 } 390 391 template<class T> 392 inline T* tIterator<T>::lastElement () 393 { 394 this->currentEl = this->list->last; 395 if (this->currentEl != NULL) 396 return this->currentEl->curr; 397 else 398 return NULL; 388 399 } 389 400 … … 405 416 return NULL; 406 417 } 418 419 /** 420 * use it to iterate backwards through the list 421 * @returns next list element 422 */ 423 template<class T> 424 inline T* tIterator<T>::prevElement () 425 { 426 if( this->currentEl == NULL) 427 return NULL; 428 429 this->currentEl = this->currentEl->prev; 430 if (this->currentEl != NULL) 431 return this->currentEl->curr; 432 else 433 return NULL; 434 } 435 407 436 408 437 /**
Note: See TracChangeset
for help on using the changeset viewer.