Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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

orxonox/trunk: reverted the last steps, because they created a huge pack of seg-faults

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/coord/p_node.cc

    r5110 r5111  
    7979{
    8080  tIterator<PNode>* iterator = this->children->getIterator();
    81   PNode* pn = iterator->firstElement();
     81  PNode* pn = iterator->nextElement();
    8282  while( pn != NULL)
    8383    {
     
    165165void PNode::setRelCoor (const Vector& relCoord)
    166166{
    167   if (this->toCoordinate!= NULL)
    168   {
    169     delete this->toCoordinate;
    170     this->toCoordinate = NULL;
    171   }
    172 
    173167  this->relCoordinate = relCoord;
    174168  this->bRelCoorChanged = true;
     
    219213void PNode::setAbsCoor (const Vector& absCoord)
    220214{
    221   if (this->toCoordinate!= NULL)
    222   {
    223     delete this->toCoordinate;
    224     this->toCoordinate = NULL;
    225   }
    226 
    227215  if( likely(this->parentMode & PNODE_MOVEMENT))
    228216  {
     
    288276void PNode::setRelDir (const Quaternion& relDir)
    289277{
    290   if (this->toDirection!= NULL)
    291   {
    292     delete this->toDirection;
    293     this->toDirection = NULL;
    294   }
    295278  this->relDirection = relDir;
    296279  this->bRelCoorChanged = true;
     
    344327void PNode::setAbsDir (const Quaternion& absDir)
    345328{
    346   if (this->toDirection!= NULL)
    347   {
    348     delete this->toDirection;
    349     this->toDirection = NULL;
    350   }
    351 
    352329  if (likely(this->parent != NULL))
    353330    this->relDirection = absDir / this->parent->getAbsDir();
     
    435412
    436413  tIterator<PNode>* iterator = this->children->getIterator();
    437   PNode* pn = iterator->firstElement();
     414  PNode* pn = iterator->nextElement();
    438415
    439416  while( pn != NULL)
     
    605582    {
    606583      tIterator<PNode>* iterator = this->children->getIterator();
    607       PNode* pn = iterator->firstElement();
     584      PNode* pn = iterator->nextElement();
    608585      while( pn != NULL)
    609586      {
     
    615592
    616593        pn->update(dt);
     594          //pn = this->children->nextElement();
    617595        pn = iterator->nextElement();
    618596      }
     
    655633    tIterator<PNode>* iterator = this->children->getIterator();
    656634      //PNode* pn = this->children->enumerate ();
    657     PNode* pn = iterator->firstElement();
     635    PNode* pn = iterator->nextElement();
    658636    while( pn != NULL)
    659637    {
     
    721699  if (depth >= 2 || depth == 0)
    722700  {
     701    tIterator<PNode>* iterator = this->children->getIterator();
     702      //PNode* pn = this->children->enumerate ();
    723703    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();
    727705    while( pn != NULL)
    728706    {
Note: See TracChangeset for help on using the changeset viewer.