Changeset 7597 in orxonox.OLD for branches/cd/src/lib
- Timestamp:
- May 11, 2006, 5:34:14 PM (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
r7590 r7597 120 120 this->calculateBoxCovariance(*this->bvElement, modelInf, triangleIndexes, length); 121 121 this->calculateBoxEigenvectors(*this->bvElement, modelInf, triangleIndexes, length); 122 this->calculateBoxAxis(*this->bvElement, modelInf, triangleIndexes, length);123 this->calculateBoxAxis(*this->bvElement, modelInf, triangleIndexes, length);122 // this->calculateBoxAxis(*this->bvElement, modelInf, triangleIndexes, length); 123 // this->calculateBoxAxis(*this->bvElement, modelInf, triangleIndexes, length); 124 124 this->calculateBoxAxis(*this->bvElement, modelInf, triangleIndexes, length); 125 125 … … 365 365 box.halfLength[i] = (maxLength[i] - minLength[i]) / 2.0f; // min length is negative 366 366 } 367 367 368 // FIXME: += anstatt -= ????????? verwirr 368 box.center.x += centerOffset[0];369 box.center.y += centerOffset[1];370 box.center.z += centerOffset[2];369 box.center.x -= centerOffset[0]; 370 box.center.y -= centerOffset[1]; 371 box.center.z -= centerOffset[2]; 371 372 372 373 PRINTF(3)("\n"); -
branches/cd/src/lib/math/plane.cc
r7589 r7597 268 268 { 269 269 n = (a-b).cross(c-b); 270 k = -(n.x*b.x+n.y*b.y+n.z*b.z);270 k = n.dot(a) / n.len(); 271 271 } 272 272 … … 279 279 { 280 280 n = norm; 281 k = -(n.x*p.x+n.y*p.y+n.z*p.z);281 k = n.dot(p) / n.len(); 282 282 } 283 283 … … 292 292 Vector p(g[0], g[1], g[2]); 293 293 n = norm; 294 k = -(n.x*p.x+n.y*p.y+n.z*p.z);294 k = n.dot(p) / n.len(); 295 295 } 296 296 … … 316 316 float l = n.len(); 317 317 if( l == 0.0) return 0.0; 318 return (n.dot(p) + k) / n.len();318 return (n.dot(p) / n.len() - k); 319 319 } 320 320 … … 342 342 { 343 343 Vector s(p[0], p[1], p[2]); 344 344 345 float l = n.len(); 345 346 if( l == 0.0) return 0.0; 346 return (n.dot(s) / *+ k*/) / n.len();347 return (n.dot(s) / n.len() - k); 347 348 } 348 349
Note: See TracChangeset
for help on using the changeset viewer.