- Timestamp:
- Jun 20, 2005, 6:47:54 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4660 r4661 392 392 for(int j = 0; j < length; ++j) 393 393 { 394 tmpLength = fabs(p 1.distancePoint(vertices[j]));394 tmpLength = fabs(p0.distancePoint(vertices[j])); 395 395 if( tmpLength > halfLength[0]) 396 396 halfLength[0] = tmpLength; … … 408 408 for(int j = 0; j < length; ++j) 409 409 { 410 tmpLength = fabs(p 1.distancePoint(vertices[j]));410 tmpLength = fabs(p2.distancePoint(vertices[j])); 411 411 if( tmpLength > halfLength[2]) 412 412 halfLength[2] = tmpLength; … … 431 431 for(int j = 0; j < length; ++j) 432 432 { 433 tmpLength = p 0.distancePoint(vertices[j]);433 tmpLength = p1.distancePoint(vertices[j]); 434 434 if( tmpLength > maxLength[1]) 435 435 maxLength[1] = tmpLength; … … 442 442 for(int j = 0; j < length; ++j) 443 443 { 444 tmpLength = p 0.distancePoint(vertices[j]);444 tmpLength = p2.distancePoint(vertices[j]); 445 445 if( tmpLength > maxLength[2]) 446 446 maxLength[2] = tmpLength; … … 455 455 for(int i = 0; i < 3; ++i) 456 456 { 457 PRINTF(0)("max: %f, min: %f \n", maxLength[i], minLength[i]); 457 458 center[i] = (maxLength[i] - minLength[i]) / 2.0f; // min length is negative 458 459 offset[i] = halfLength[i] - center[i]; -
orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
r4647 r4661 45 45 model->tick(0.1f); 46 46 47 // int const length = 6;48 // sVec3D* vertList = new sVec3D[length];49 // sVec3D data[length] = {{5.0, 0.0, 0.0},{2.0, 0.0, 5.0},{14.0, 0.0, 0.0}, {5.0, 0.0, 1.0}, {12.0, 0.0, 8.0}, {3.0, 5.0, 4.9}};50 //51 // for(int i = 0; i < length; ++i)52 // {53 // vertList[i][0] = data[i][0];54 // vertList[i][1] = data[i][1];55 // vertList[i][2] = data[i][2];56 // }57 47 58 48 CDEngine::getInstance()->debugSpawnTree(9, model->data->pVertices, model->data->numVertices);
Note: See TracChangeset
for help on using the changeset viewer.