Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 22, 2005, 4:02:08 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: some more fixing of the Errors reported by valgrind
removed some stuff in patrick's collision-detection.
also changed Vector* to Vector in Rectangle (patrick tell me, if this is not ok - but i doubt it :))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/spatial_separation/quadtree.cc

    r5075 r5215  
    5353  /* make an array with access to the leafs of the Quad-Tree */
    5454  this->nodes = new QuadtreeNode*[(int)pow(4, treeDepth)];
    55   int* index = new int; *index = 0;
     55  int index = 0; //new int; *index = 0; // !!changed by bensch!!
    5656  for(int i = 0; i < (int)pow(2, treeDepth); ++i)
    5757  {
    58     this->rootNode->buildHashTable(this->nodes, index);
     58    this->rootNode->buildHashTable(this->nodes, &index);
    5959  }
    6060  /* sort and revert the hash table to fit the right position */
     
    6565  this->quadLength = this->nodes[0]->getDimension()->getAxis() * 2.0f;
    6666  Rectangle* r = this->rootNode->getDimension();
    67   Vector* offset = new Vector();
    68   float xOff = r->getCenter()->x - r->getAxis();
    69   float yOff = r->getCenter()->z - r->getAxis();
     67  //  Vector* offset = new Vector(); // unused removed by bensch
     68  float xOff = r->getCenter().x - r->getAxis();
     69  float yOff = r->getCenter().z - r->getAxis();
    7070  this->offset = new Vector();
    7171  this->offset->x = xOff;
     
    136136      for( int k = j + 1; k < len; ++k)
    137137      {
    138         a = this->nodes[i * len + j]->getDimension()->getCenter()->z;
    139         b = this->nodes[i * len + k]->getDimension()->getCenter()->z;
     138        a = this->nodes[i * len + j]->getDimension()->getCenter().z;
     139        b = this->nodes[i * len + k]->getDimension()->getCenter().z;
    140140
    141141        if( b > a)
Note: See TracChangeset for help on using the changeset viewer.