Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 21, 2005, 6:07:23 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: implemented a point in triangle function

File:
1 edited

Legend:

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

    r4925 r4929  
    167167  int j = (int)(v.z / quadLength);
    168168
    169   /* check if object is still inside the terrain */
     169  /* check if object is still inside the terrain - this check is not complete @todo check all 4 bounds */
    170170  if( i < this->maxIndex && j < this->maxIndex)
    171171    this->nodes[i + j * this->maxIndex]->includesPoint(position);
     
    176176
    177177/**
     178 *  maps a position to a triangle
     179 * @param position the position so look for
     180 * @return the triangle
     181
     182  this function will return the quadtree that contains the position
     183 */
     184sTriangleExt* Quadtree::getTriangleFromPosition(const Vector& position)
     185{
     186  QuadtreeNode* q = this->getQuadtreeFromPosition(position);
     187  return q->getTriangle(position);
     188}
     189
     190
     191/**
    178192 *  draws the debug quadtree boxes around the model
    179193 */
Note: See TracChangeset for help on using the changeset viewer.