Changeset 3249 in orxonox.OLD for orxonox/branches/parenting/src
- Timestamp:
- Dec 22, 2004, 4:50:54 PM (20 years ago)
- Location:
- orxonox/branches/parenting/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/parenting/src/data_tank.cc
r2190 r3249 19 19 using namespace std; 20 20 21 long DataTank::timeStamp = 0; 22 21 23 DataTank::DataTank () {} 22 24 DataTank::~DataTank () {} -
orxonox/branches/parenting/src/data_tank.h
r3224 r3249 10 10 ~DataTank (); 11 11 12 static long timeStamp; 13 12 14 }; 13 15 -
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 -
orxonox/branches/parenting/src/p_node.h
r3248 r3249 53 53 void removeChild (PNode* pNode); 54 54 void setParent (PNode* parent); 55 void update ( );55 void update (long timeStamp); 56 56 57 57 private: -
orxonox/branches/parenting/src/stdincl.h
r3224 r3249 38 38 #include "message_structures.h" 39 39 #include "orxonox.h" 40 #include "data_tank.h" 40 41 41 42 #endif /* _STDINCL_H */
Note: See TracChangeset
for help on using the changeset viewer.