Changeset 5111 in orxonox.OLD for trunk/src/lib/coord
- Timestamp:
- Aug 23, 2005, 11:13:56 PM (19 years ago)
- Location:
- trunk/src/lib/coord
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r5110 r5111 79 79 { 80 80 tIterator<PNode>* iterator = this->children->getIterator(); 81 PNode* pn = iterator-> firstElement();81 PNode* pn = iterator->nextElement(); 82 82 while( pn != NULL) 83 83 { … … 165 165 void PNode::setRelCoor (const Vector& relCoord) 166 166 { 167 if (this->toCoordinate!= NULL)168 {169 delete this->toCoordinate;170 this->toCoordinate = NULL;171 }172 173 167 this->relCoordinate = relCoord; 174 168 this->bRelCoorChanged = true; … … 219 213 void PNode::setAbsCoor (const Vector& absCoord) 220 214 { 221 if (this->toCoordinate!= NULL)222 {223 delete this->toCoordinate;224 this->toCoordinate = NULL;225 }226 227 215 if( likely(this->parentMode & PNODE_MOVEMENT)) 228 216 { … … 288 276 void PNode::setRelDir (const Quaternion& relDir) 289 277 { 290 if (this->toDirection!= NULL)291 {292 delete this->toDirection;293 this->toDirection = NULL;294 }295 278 this->relDirection = relDir; 296 279 this->bRelCoorChanged = true; … … 344 327 void PNode::setAbsDir (const Quaternion& absDir) 345 328 { 346 if (this->toDirection!= NULL)347 {348 delete this->toDirection;349 this->toDirection = NULL;350 }351 352 329 if (likely(this->parent != NULL)) 353 330 this->relDirection = absDir / this->parent->getAbsDir(); … … 435 412 436 413 tIterator<PNode>* iterator = this->children->getIterator(); 437 PNode* pn = iterator-> firstElement();414 PNode* pn = iterator->nextElement(); 438 415 439 416 while( pn != NULL) … … 605 582 { 606 583 tIterator<PNode>* iterator = this->children->getIterator(); 607 PNode* pn = iterator-> firstElement();584 PNode* pn = iterator->nextElement(); 608 585 while( pn != NULL) 609 586 { … … 615 592 616 593 pn->update(dt); 594 //pn = this->children->nextElement(); 617 595 pn = iterator->nextElement(); 618 596 } … … 655 633 tIterator<PNode>* iterator = this->children->getIterator(); 656 634 //PNode* pn = this->children->enumerate (); 657 PNode* pn = iterator-> firstElement();635 PNode* pn = iterator->nextElement(); 658 636 while( pn != NULL) 659 637 { … … 721 699 if (depth >= 2 || depth == 0) 722 700 { 701 tIterator<PNode>* iterator = this->children->getIterator(); 702 //PNode* pn = this->children->enumerate (); 723 703 Vector childColor = Color::HSVtoRGB(Color::RGBtoHSV(color)+Vector(20,0,.0)); 724 725 tIterator<PNode>* iterator = this->children->getIterator(); 726 PNode* pn = iterator->firstElement(); 704 PNode* pn = iterator->nextElement(); 727 705 while( pn != NULL) 728 706 { -
trunk/src/lib/coord/p_node.h
r5109 r5111 66 66 /** @returns the relative position */ 67 67 inline const Vector& getRelCoor () const { return this->prevRelCoordinate; }; 68 /** @returns the Relative Coordinate Destination */69 inline const Vector& getRelCoorSoft2D() const { return (this->toCoordinate)?*this->toCoordinate:this->relCoordinate; };70 68 void setAbsCoor (const Vector& absCoord); 71 69 void setAbsCoor (float x, float y, float z); … … 80 78 /** @returns the relative Direction */ 81 79 inline const Quaternion& getRelDir () const { return this->prevRelDirection; }; 82 /** @returns the Relative Directional Destination */83 inline const Quaternion& getRelDirSoft2D() const { return (this->toDirection)?*this->toDirection:this->relDirection; };84 80 /** @returns a Vector pointing into the relative Direction */ 85 81 inline Vector getRelDirV() const { return this->prevRelDirection.apply(Vector(0,1,0)); };
Note: See TracChangeset
for help on using the changeset viewer.