Changeset 4968 in orxonox.OLD for orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.cc
- Timestamp:
- Jul 29, 2005, 12:20:03 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.cc
r4956 r4968 168 168 169 169 /* 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; 174 176 } 175 177 … … 185 187 { 186 188 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; 188 193 } 189 194
Note: See TracChangeset
for help on using the changeset viewer.