Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7589 in orxonox.OLD for branches/cd


Ignore:
Timestamp:
May 11, 2006, 2:20:53 AM (19 years ago)
Author:
patrick
Message:

cd: restructuring, bug not found, strange things going on

Location:
branches/cd/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/cd/src/lib/collision_detection/obb_tree_node.cc

    r7588 r7589  
    291291  float               centerOffset[3];
    292292
     293  box.center.debug();
    293294
    294295  /* get the maximal dimensions of the body in all directions */
     
    297298  {
    298299    tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[0]].indexToVertices[0]]);
    299     maxLength[0] = p0.distancePoint(tmpVec);
    300     minLength[0] = p0.distancePoint(tmpVec);
     300    Plane* p;
     301    if( k == 0)
     302      p = &p0;
     303    else if( k == 1)
     304      p = &p1;
     305    else
     306      p = &p2;
     307    maxLength[k] = p->distancePoint(tmpVec);
     308    minLength[k] = p->distancePoint(tmpVec);
     309
    301310    for( int j = 0; j < length; ++j)
    302311    {
     
    304313      {
    305314        tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]);
    306         tmpLength = p0.distancePoint(tmpVec);
    307         if( tmpLength > maxLength[0])
    308           maxLength[0] = tmpLength;
    309         else if( tmpLength < minLength[0])
    310           minLength[0] = tmpLength;
     315        tmpLength = p->distancePoint(tmpVec);
     316        if( tmpLength > maxLength[k])
     317          maxLength[k] = tmpLength;
     318        else if( tmpLength < minLength[k])
     319          minLength[k] = tmpLength;
    311320      }
    312321    }
  • branches/cd/src/lib/math/plane.cc

    r7583 r7589  
    344344  float l = n.len();
    345345  if( l == 0.0) return 0.0;
    346   return (n.dot(s) + k) / n.len();
     346  return (n.dot(s) /*+ k*/) / n.len();
    347347}
    348348
Note: See TracChangeset for help on using the changeset viewer.