Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3534 in orxonox.OLD for orxonox/trunk/src/lib/coord


Ignore:
Timestamp:
Mar 13, 2005, 11:30:11 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: fixed another bug in list-template and added patch from bensch to the pnode to enable the different rotation modes

File:
1 edited

Legend:

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

    r3531 r3534  
    396396  // printf("%s", this->objectName);
    397397
    398       if( this->mode == MOVEMENT || this->mode == ALL)
     398      if( this->mode == MOVEMENT )
    399399        {
    400400          if( this->bAbsCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
     
    428428              this->absDirection = parent->getAbsDir() * this->relDirection;
    429429            }
    430         }   
     430        }
     431     
     432      if( this->mode == ALL)
     433        {
     434          if( this->bAbsCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
     435            {
     436              printf("PNode::update () - this->bAbsCoorChanged = true\n");
     437              /* if you have set the absolute coordinates this overrides all other changes */
     438              this->relCoordinate = this->absCoordinate - parent->getAbsCoor ();
     439            }
     440          else if( this->bRelCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
     441            {
     442              /*this is bad style... must be deleted later - just for testing*/
     443              if( this->parent == NULL)
     444                this->absCoordinate = this->relCoordinate;
     445              else
     446                this->absCoordinate = parent->getAbsCoor() + parent->getAbsDir().apply(this->relCoordinate);          /* update the current absCoordinate */
     447            }
     448        }
     449
     450
    431451  PNode* pn = this->children->enumerate();
    432452  while( pn != NULL)
Note: See TracChangeset for help on using the changeset viewer.