Changeset 4440 in orxonox.OLD for orxonox/trunk/src/lib/coord/null_parent.cc
- Timestamp:
- Jun 1, 2005, 9:57:19 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/coord/null_parent.cc
r3966 r4440 43 43 { 44 44 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); 47 46 this->setName("NullParent"); 48 47 } … … 52 51 { 53 52 singletonRef = this; 54 this->parent = this; 55 this->mode = PNODE_ALL; 56 this->absCoordinate = absCoordinate; 53 this->setMode(PNODE_ALL); 57 54 this->setName("NullParent"); 58 55 } … … 77 74 worry, normaly... 78 75 */ 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.