Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5118 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Aug 24, 2005, 2:45:46 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: semi-active buffers

Location:
trunk/src/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/coord/p_node.cc

    r5115 r5118  
    598598      PRINTF(4)("NullParent::update - (%f, %f, %f)\n", this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    599599      if (this->bRelCoorChanged)
     600      {
     601        this->prevRelCoordinate = this->relCoordinate;
    600602        this->absCoordinate = this->relCoordinate;
     603      }
    601604      if (this->bRelDirChanged)
     605      {
     606        this->prevRelDirection = this->relDirection;
    602607        this->absDirection = this->getAbsDir () * this->relDirection;
     608      }
    603609    }
    604610
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r5117 r5118  
    618618
    619619
    620     if( this->parentMode & PNODE_LOCAL_ROTATE && this->bRelDirChanged)
     620    if( this->parentMode & E2D_PARENT_LOCAL_ROTATE && this->bRelDirChanged)
    621621    {
    622622      /* update the current absDirection - remember * means rotation around sth.*/
     
    677677    PRINTF(5)("Element2D::update - (%f, %f, %f)\n", this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    678678    if (this->bRelCoorChanged)
     679    {
     680      this->prevRelCoordinate = this->relCoordinate;
    679681      this->absCoordinate = this->relCoordinate;
     682    }
    680683    if (this->bRelDirChanged)
     684    {
     685      this->prevRelDirection = this->relDirection;
    681686      this->absDirection = this->getAbsDir2D() * this->relDirection;
     687    }
    682688  }
    683689
  • trunk/src/lib/util/list.h

    r5115 r5118  
    333333
    334334    T* firstElement();
     335    T* lastElement();
    335336    T* nextElement();
     337    T* prevElement();
    336338    T* seekElement(T* element);
    337339    T* iteratorElement(const tIterator<T>* iterator);
     
    375377    inline tIterator<T>::~tIterator ()
    376378{
    377   this->currentEl = NULL;
    378379}
    379380
     
    382383{
    383384  this->currentEl = this->list->first;
    384   if (this->currentEl == NULL)
    385     return NULL;
    386   else
     385  if (this->currentEl != NULL)
    387386    return this->currentEl->curr;
     387  else
     388    return NULL;
     389}
     390
     391template<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;
    388399}
    389400
     
    405416    return NULL;
    406417}
     418
     419/**
     420 *  use it to iterate backwards through the list
     421 * @returns next list element
     422 */
     423template<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
    407436
    408437/**
Note: See TracChangeset for help on using the changeset viewer.