Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4440 in orxonox.OLD for orxonox/trunk/src/lib/coord/null_parent.cc


Ignore:
Timestamp:
Jun 1, 2005, 9:57:19 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: pnode enhancement and cleanup, very tight now

File:
1 edited

Legend:

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

    r3966 r4440  
    4343{
    4444  PRINTF(4)("NullParent::NullParent() - making new NullParent, there can only be one..\n");
    45   this->parent = this;
    46   this->mode = PNODE_ALL;
     45  this->setMode(PNODE_ALL);
    4746  this->setName("NullParent");
    4847}
     
    5251{
    5352  singletonRef = this;
    54   this->parent = this;
    55   this->mode = PNODE_ALL;
    56   this->absCoordinate = absCoordinate;
     53  this->setMode(PNODE_ALL);
    5754  this->setName("NullParent");
    5855}
     
    7774   worry, normaly...
    7875*/
    79 void NullParent::update (float dt)
    80 {
    81 
    82   PRINTF(4)("NullParent::update - (%f, %f, %f)\n", this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    83   this->absCoordinate = this->relCoordinate;
    84   this->absDirection = parent->getAbsDir () * this->relDirection;
    85 
    86   tIterator<PNode>* iterator = this->children->getIterator();
    87   //PNode* pn = this->children->enumerate ();
    88   PNode* pn = iterator->nextElement();
    89   while( pn != NULL)
    90     {
    91       /* if this node has changed, make sure, that all children are updated also */
    92       if( this->bRelCoorChanged || this->bAbsCoorChanged)
    93         pn->parentCoorChanged ();
    94       if( this->bRelDirChanged || this->bAbsDirChanged)
    95         pn->parentDirChanged ();
    96       pn->update (dt);
    97       //pn = this->children->nextElement ();
    98       pn = iterator->nextElement();
    99     }
    100 
    101   this->timeStamp = timeStamp;
    102   this->bRelCoorChanged = false;
    103   this->bAbsCoorChanged = false;
    104   this->bRelDirChanged = false;
    105   this->bAbsDirChanged = false;
    106 }
Note: See TracChangeset for help on using the changeset viewer.