Changeset 3249 in orxonox.OLD for orxonox/branches/parenting/src/p_node.cc
- Timestamp:
- Dec 22, 2004, 4:50:54 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/parenting/src/p_node.cc
r3248 r3249 31 31 { 32 32 this->children = new tList<PNode>(); 33 this->bCoorChanged = true; 34 this->bDirChanged = true; 33 35 } 34 36 … … 230 232 worry, normaly... 231 233 */ 232 void PNode::update() 233 { 234 void PNode::update(long timeStamp) 235 { 236 if(this->parent == NULL) 237 printf("PNode::upate(long timeStamp) - parent is NULL..."); 238 if( this->bCoorChanged && this->timeStamp != DataTank::timeStamp) 239 { 240 /* update the current absCoordinate */ 241 this->absCoordinate = parent->getAbsCoor () + this->relCoordinate; 242 } 243 if( this->bDirChanged && this->timeStamp != DataTank::timeStamp) 244 { 245 /* update the current absDirection - remember * means rotation around sth.*/ 246 this->absDirection = parent->getAbsDir () * this->relDirection; 247 } 234 248 235 } 236 249 PNode* pn = this->children->enumerate(); 250 while( pn != NULL) 251 { 252 pn->update(timeStamp); 253 pn = this->children->nextElement(); 254 } 255 256 this->timeStamp = timeStamp; 257 this->bCoorChanged = false; 258 this->bDirChanged = false; 259 260 } 261
Note: See TracChangeset
for help on using the changeset viewer.