Changeset 7665 in orxonox.OLD for branches/cd/src/lib
- Timestamp:
- May 18, 2006, 1:24:56 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cd/src/lib/collision_detection/obb_tree_node.cc
r7660 r7665 131 131 for(int j = 0; j < 3; ++j) 132 132 { 133 PRINTF(2)(" vertex[%i]: %f, %f, %f\n", j, (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[0], 133 PRINTF(2)(" vertex[%i]: %f, %f, %f\n", j, 134 (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[0], 134 135 (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[1], 135 136 (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[i]].indexToVertices[j]])[2]); … … 137 138 } 138 139 140 PRINT(0)("\n\n\n"); 141 for( int i = 0; i < this->bvElement->modelInf->numVertices*3; i+=3) 142 PRINTF(0)( "vertex[%i]: %f, %f, %f\n", i, this->bvElement->modelInf->pVertices[i], 143 this->bvElement->modelInf->pVertices[i+1], 144 this->bvElement->modelInf->pVertices[i+2]); 139 145 140 146 … … 280 286 /* calculate the axis */ 281 287 covMat.getEigenVectors(axis[0], axis[1], axis[2] ); 282 box.axis[0] = axis[0];283 box.axis[1] = axis[1];284 box.axis[2] = axis[2];288 // box.axis[0] = axis[0]; 289 // box.axis[1] = axis[1]; 290 // box.axis[2] = axis[2]; 285 291 286 292 box.axis[0] = Vector(1,0,0); … … 319 325 float centerOffset[3]; 320 326 321 322 323 327 /* get the maximal dimensions of the body in all directions */ 324 328 /* for the initialisation the value just has to be inside of the polygon soup -> first vertices (rand) */ … … 335 339 maxLength[k] = p->distancePoint(tmpVec); 336 340 minLength[k] = p->distancePoint(tmpVec); 337 341 PRINT(0)("axis[%i]: %f %f %f\n", k, box.axis[k].x, box.axis[k].y, box.axis[k].z); 338 342 339 343 for( int j = 0; j < length; ++j) { … … 341 345 tmpVec = &modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]]; 342 346 tmpLength = p->distancePoint(tmpVec); 347 PRINT(0)("vertex normal vec: %i, (%f, %f, %f) distance = %f\n", k, (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]])[0], 348 (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]])[1], 349 (&modelInf.pVertices[modelInf.pTriangles[triangleIndexes[j]].indexToVertices[i]])[2], 350 tmpLength); 343 351 if( tmpLength > maxLength[k]) 344 352 maxLength[k] = tmpLength; … … 393 401 } 394 402 395 // FIXME: += anstatt -= ????????? verwirr396 403 box.center.x += centerOffset[0]; 397 404 box.center.y += centerOffset[1]; … … 710 717 glBegin(GL_POINTS); 711 718 glColor3f(0.3, 0.8, 0.54); 712 for( int i = 0; i < this->bvElement->modelInf->numVertices*3; i+=3) 713 glVertex3f(this->bvElement->modelInf->pVertices[i], 714 this->bvElement->modelInf->pVertices[i+1], 715 this->bvElement->modelInf->pVertices[i+2]); 719 for( int i = 0; i < this->bvElement->modelInf->numTriangles; ++i) 720 { 721 PRINTF(2)("triangle[%i]\n", i); 722 for(int j = 0; j < 3; ++j) 723 { 724 glVertex3f( 725 (&this->bvElement->modelInf->pVertices[this->bvElement->modelInf->pTriangles[i].indexToVertices[j]])[0], 726 (&this->bvElement->modelInf->pVertices[this->bvElement->modelInf->pTriangles[i].indexToVertices[j]])[1], 727 (&this->bvElement->modelInf->pVertices[this->bvElement->modelInf->pTriangles[i].indexToVertices[j]])[2]); 728 } 729 } 730 731 // for( int i = 0; i < this->bvElement->modelInf->numVertices*3; i+=3) 732 // glVertex3f(this->bvElement->modelInf->pVertices[i], 733 // this->bvElement->modelInf->pVertices[i+1], 734 // this->bvElement->modelInf->pVertices[i+2]); 716 735 glEnd(); 717 736 }
Note: See TracChangeset
for help on using the changeset viewer.