Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 23, 2005, 9:51:20 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: softDir/softCoor is now overwritten(deleted) if one sets the relCoor/relDir/absDir/absCoor
shell is also in smooth-mode now :)

File:
1 edited

Legend:

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

    r5107 r5108  
    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();
Note: See TracChangeset for help on using the changeset viewer.