Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 23, 2005, 11:18:39 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk:restoring the trunk…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r5111 r5113  
    214214void Element2D::setRelCoor2D (const Vector& relCoord)
    215215{
     216  if (this->toCoordinate!= NULL)
     217  {
     218    delete this->toCoordinate;
     219    this->toCoordinate = NULL;
     220  }
    216221  this->relCoordinate = relCoord;
    217222  this->bRelCoorChanged = true;
     
    227232void Element2D::setRelCoor2D (float x, float y, float z)
    228233{
    229   this->setAbsCoor2D(Vector(x,y,z));
     234  this->setRelCoor2D(Vector(x,y,z));
    230235}
    231236
     
    288293void Element2D::setAbsCoor2D (const Vector& absCoord)
    289294{
     295  if (this->toCoordinate!= NULL)
     296  {
     297    delete this->toCoordinate;
     298    this->toCoordinate = NULL;
     299  }
     300
    290301  if( likely(this->parentMode & E2D_PARENT_MOVEMENT))
    291302  {
     
    362373void Element2D::setRelDir2D (float relDir)
    363374{
     375  if (this->toDirection!= NULL)
     376  {
     377    delete this->toDirection;
     378    this->toDirection = NULL;
     379  }
     380
    364381  this->relDirection = relDir;
    365382  this->bRelDirChanged = true;
     
    386403void Element2D::setAbsDir2D (float absDir)
    387404{
     405  if (this->toDirection!= NULL)
     406  {
     407    delete this->toDirection;
     408    this->toDirection = NULL;
     409  }
     410
    388411  if (likely(this->parent != NULL))
    389412    this->relDirection = absDir - this->parent->getAbsDir2D();
     
    712735  {
    713736    tIterator<Element2D>* iterator = this->children->getIterator();
    714       //PNode* pn = this->children->enumerate ();
    715737    Element2D* pn = iterator->nextElement();
    716738    while( pn != NULL)
Note: See TracChangeset for help on using the changeset viewer.