Changeset 7589 in orxonox.OLD for branches/cd
- Timestamp:
- May 11, 2006, 2:20:53 AM (19 years ago)
- Location:
- branches/cd/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cd/src/lib/collision_detection/obb_tree_node.cc
r7588 r7589 291 291 float centerOffset[3]; 292 292 293 box.center.debug(); 293 294 294 295 /* get the maximal dimensions of the body in all directions */ … … 297 298 { 298 299 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 301 310 for( int j = 0; j < length; ++j) 302 311 { … … 304 313 { 305 314 tmpVec = (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]); 306 tmpLength = p 0.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; 311 320 } 312 321 } -
branches/cd/src/lib/math/plane.cc
r7583 r7589 344 344 float l = n.len(); 345 345 if( l == 0.0) return 0.0; 346 return (n.dot(s) + k) / n.len();346 return (n.dot(s) /*+ k*/) / n.len(); 347 347 } 348 348
Note: See TracChangeset
for help on using the changeset viewer.