Changeset 5493 in orxonox.OLD for trunk/src/lib/collision_detection
- Timestamp:
- Nov 4, 2005, 6:43:46 PM (19 years ago)
- Location:
- trunk/src/lib/collision_detection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_detection/lin_alg.h
r5491 r5493 462 462 463 463 464 465 466 467 468 // void jacobi(Matrix A, int n, sVec3D d, Matrix V, int *nRot) 469 // { 470 // sVec3D B, Z; 471 // double c, g, h, s, sm, t, tau, theta, tresh; 472 // int i, j, ip, iq; 473 // 474 // void *vmblock1 = NULL; 464 // void jacobi(float **A, float *D, float **V, int *nRot) { 465 // 466 // int n = 3; 467 // 468 // float *B, *Z; 469 // double c=0.0f, g=0.0f, h=0.0f, s=0.0f, sm=0.0f, t=0.0f, tau=0.0f, theta=0.0f, tresh=0.0f; 470 // int i = 0, j = 0, ip = 0, iq = 0; 471 // 472 // //void *vmblock1 = NULL; 475 473 // 476 474 // //allocate vectors B, Z 477 // vmblock1 = vminit();475 // //vmblock1 = vminit(); 478 476 // //B = (float *) vmalloc(vmblock1, VEKTOR, 100, 0); 479 477 // //Z = (float *) vmalloc(vmblock1, VEKTOR, 100, 0); 478 // B = new float[n+1]; 479 // Z = new float[n+1]; 480 480 // 481 481 // //initialize V to identity matrix … … 504 504 // { 505 505 // //vmfree(vmblock1); 506 // delete[] B; 507 // delete[] Z; 506 508 // return; //normal return 507 509 // } … … 512 514 // for(int k = 1; k < n; k++) 513 515 // { 514 // for (iq=ip+1; iq<= N; iq++) {516 // for (iq=ip+1; iq<=n; iq++) { 515 517 // g=100*fabs(A[ip][iq]); 516 518 // // after 4 sweeps, skip the rotation if the off-diagonal element is small … … 547 549 // A[j][iq] = h+s*(g-h*tau); 548 550 // } 549 // for (j=iq+1; j<= N; j++) {551 // for (j=iq+1; j<=n; j++) { 550 552 // g=A[ip][j]; 551 553 // h=A[iq][j]; … … 553 555 // A[iq][j] = h+s*(g-h*tau); 554 556 // } 555 // for (j=1; j<= N; j++) {557 // for (j=1; j<=n; j++) { 556 558 // g=V[j][ip]; 557 559 // h=V[j][iq]; … … 559 561 // V[j][iq] = h+s*(g-h*tau); 560 562 // } 561 // * NROT=*NROT+1;563 // *nRot=*nRot+1; 562 564 // } //end ((i.gt.4)...else if 563 565 // } // main iq loop 564 566 // } // main ip loop 565 // for (ip=1; ip<= N; ip++) {567 // for (ip=1; ip<=n; ip++) { 566 568 // B[ip] += Z[ip]; 567 569 // D[ip]=B[ip]; … … 570 572 // } //end of main i loop 571 573 // printf("\n 50 iterations !\n"); 572 // vmfree(vmblock1); 574 // //vmfree(vmblock1); 575 // delete[] Z; 576 // delete[] B; 573 577 // return; //too many iterations 574 578 // } -
trunk/src/lib/collision_detection/obb_tree_node.cc
r5492 r5493 385 385 // OBBTreeNode::coMat[2][2] = 8; 386 386 387 OBBTreeNode::coMat[0][0] = box->covarianceMatrix[0][0];388 OBBTreeNode::coMat[0][1] = box->covarianceMatrix[0][1];389 OBBTreeNode::coMat[0][2] = box->covarianceMatrix[0][2];390 391 OBBTreeNode::coMat[1][0] = box->covarianceMatrix[1][0];392 OBBTreeNode::coMat[1][1] = box->covarianceMatrix[1][1];393 OBBTreeNode::coMat[1][3] = box->covarianceMatrix[1][2];394 395 OBBTreeNode::coMat[2][0] = box->covarianceMatrix[2][0];396 OBBTreeNode::coMat[2][1] = box->covarianceMatrix[2][1];397 OBBTreeNode::coMat[2][2] = box->covarianceMatrix[2][2];387 // OBBTreeNode::coMat[1][1] = box->covarianceMatrix[0][0]; 388 // OBBTreeNode::coMat[1][2] = box->covarianceMatrix[0][1]; 389 // OBBTreeNode::coMat[1][3] = box->covarianceMatrix[0][2]; 390 // 391 // OBBTreeNode::coMat[2][1] = box->covarianceMatrix[1][0]; 392 // OBBTreeNode::coMat[2][2] = box->covarianceMatrix[1][1]; 393 // OBBTreeNode::coMat[2][3] = box->covarianceMatrix[1][2]; 394 // 395 // OBBTreeNode::coMat[3][1] = box->covarianceMatrix[2][0]; 396 // OBBTreeNode::coMat[3][2] = box->covarianceMatrix[2][1]; 397 // OBBTreeNode::coMat[3][3] = box->covarianceMatrix[2][2]; 398 398 399 399
Note: See TracChangeset
for help on using the changeset viewer.