Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 29, 2005, 12:20:03 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: some fixeds in the quadtree framework. No debug draw anymore

File:
1 edited

Legend:

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

    r4956 r4968  
    168168
    169169  /* check if object is still inside the terrain - this check is not complete @todo check all 4 bounds */
    170   if( i < this->maxIndex && j < this->maxIndex)
    171     this->nodes[i + j * this->maxIndex]->includesPoint(position);
    172   else
    173     PRINTF(5)("Object has left terrain\n");
     170  if( i < this->maxIndex && j < this->maxIndex && i >= 0 && j >= 0)
     171    return this->nodes[i + j * this->maxIndex];
     172
     173
     174  PRINTF(4)("Object has left terrain\n");
     175  return NULL;
    174176}
    175177
     
    185187{
    186188  QuadtreeNode* q = this->getQuadtreeFromPosition(position);
    187   return q->getTriangle(position);
     189
     190  if( likely(q != NULL))
     191    return q->getTriangle(position - *this->offset);
     192  return NULL;
    188193}
    189194
Note: See TracChangeset for help on using the changeset viewer.