Changeset 5111 in orxonox.OLD for trunk/src/lib/graphics/render2D
- Timestamp:
- Aug 23, 2005, 11:13:56 PM (19 years ago)
- Location:
- trunk/src/lib/graphics/render2D
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/render2D/element_2d.cc
r5110 r5111 55 55 56 56 tIterator<Element2D>* iterator = this->children->getIterator(); 57 Element2D* pn = iterator-> firstElement();57 Element2D* pn = iterator->nextElement(); 58 58 while( pn != NULL) 59 59 { … … 214 214 void Element2D::setRelCoor2D (const Vector& relCoord) 215 215 { 216 if (this->toCoordinate!= NULL)217 {218 delete this->toCoordinate;219 this->toCoordinate = NULL;220 }221 216 this->relCoordinate = relCoord; 222 217 this->bRelCoorChanged = true; … … 232 227 void Element2D::setRelCoor2D (float x, float y, float z) 233 228 { 234 this->set RelCoor2D(Vector(x,y,z));229 this->setAbsCoor2D(Vector(x,y,z)); 235 230 } 236 231 … … 293 288 void Element2D::setAbsCoor2D (const Vector& absCoord) 294 289 { 295 if (this->toCoordinate!= NULL)296 {297 delete this->toCoordinate;298 this->toCoordinate = NULL;299 }300 301 290 if( likely(this->parentMode & E2D_PARENT_MOVEMENT)) 302 291 { … … 373 362 void Element2D::setRelDir2D (float relDir) 374 363 { 375 if (this->toDirection!= NULL)376 {377 delete this->toDirection;378 this->toDirection = NULL;379 }380 381 364 this->relDirection = relDir; 382 365 this->bRelDirChanged = true; … … 403 386 void Element2D::setAbsDir2D (float absDir) 404 387 { 405 if (this->toDirection!= NULL)406 {407 delete this->toDirection;408 this->toDirection = NULL;409 }410 411 388 if (likely(this->parent != NULL)) 412 389 this->relDirection = absDir - this->parent->getAbsDir2D(); … … 479 456 { 480 457 tIterator<Element2D>* iterator = this->children->getIterator(); 481 Element2D* pn = iterator-> firstElement();458 Element2D* pn = iterator->nextElement(); 482 459 483 460 while( pn != NULL) … … 687 664 { 688 665 tIterator<Element2D>* iterator = this->children->getIterator(); 689 Element2D* pn = iterator-> firstElement();666 Element2D* pn = iterator->nextElement(); 690 667 while( pn != NULL) 691 668 { … … 697 674 698 675 pn->update2D(dt); 676 //pn = this->children->nextElement(); 699 677 pn = iterator->nextElement(); 700 678 } … … 734 712 { 735 713 tIterator<Element2D>* iterator = this->children->getIterator(); 736 Element2D* pn = iterator->firstElement(); 714 //PNode* pn = this->children->enumerate (); 715 Element2D* pn = iterator->nextElement(); 737 716 while( pn != NULL) 738 717 { -
trunk/src/lib/graphics/render2D/element_2d.h
r5109 r5111 108 108 /** @returns the relative position */ 109 109 inline const Vector& getRelCoor2D () const { return this->prevRelCoordinate; }; 110 /** @returns the Relative Coordinate Destination */111 inline const Vector& getRelCoorSoft2D() const { return (this->toCoordinate)?*this->toCoordinate:this->relCoordinate; };112 110 const Vector& getRelCoor2Dpx() const; 113 111 void setAbsCoor2D (const Vector& absCoord); … … 125 123 /** @returns the relative Direction */ 126 124 inline float getRelDir2D () const { return this->prevRelDirection; }; 127 /** @returns the Relative Directional Destination */128 inline float getRelDirSoft2D() const { return (this->toDirection)?*this->toDirection:this->relDirection; };129 125 void setAbsDir2D (float absDir); 130 126 /** @returns the absolute Direction */ -
trunk/src/lib/graphics/render2D/render_2d.cc
r5110 r5111 105 105 { 106 106 tIterator<Element2D>* iterator = this->element2DList[i]->getIterator(); 107 Element2D* elem = iterator-> firstElement();107 Element2D* elem = iterator->nextElement(); 108 108 while (elem != NULL) 109 109 { … … 131 131 { 132 132 tIterator<Element2D>* iterator = this->element2DList[i]->getIterator(); 133 Element2D* elem = iterator-> firstElement();133 Element2D* elem = iterator->nextElement(); 134 134 while (elem != NULL) 135 135 {
Note: See TracChangeset
for help on using the changeset viewer.