Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5108 in orxonox.OLD for trunk/src/lib/coord/p_node.cc


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/coord/p_node.cc

    r5091 r5108  
    165165void PNode::setRelCoor (const Vector& relCoord)
    166166{
     167  if (this->toCoordinate!= NULL)
     168  {
     169    delete this->toCoordinate;
     170    this->toCoordinate = NULL;
     171  }
     172
    167173  this->relCoordinate = relCoord;
    168174  this->bRelCoorChanged = true;
     
    213219void PNode::setAbsCoor (const Vector& absCoord)
    214220{
     221  if (this->toCoordinate!= NULL)
     222  {
     223    delete this->toCoordinate;
     224    this->toCoordinate = NULL;
     225  }
     226
    215227  if( likely(this->parentMode & PNODE_MOVEMENT))
    216228  {
     
    276288void PNode::setRelDir (const Quaternion& relDir)
    277289{
     290  if (this->toDirection!= NULL)
     291  {
     292    delete this->toDirection;
     293    this->toDirection = NULL;
     294  }
    278295  this->relDirection = relDir;
    279296  this->bRelCoorChanged = true;
     
    327344void PNode::setAbsDir (const Quaternion& absDir)
    328345{
     346  if (this->toDirection!= NULL)
     347  {
     348    delete this->toDirection;
     349    this->toDirection = NULL;
     350  }
     351
    329352  if (likely(this->parent != NULL))
    330353    this->relDirection = absDir / this->parent->getAbsDir();
Note: See TracChangeset for help on using the changeset viewer.