Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5493 in orxonox.OLD for trunk/src/lib/collision_detection


Ignore:
Timestamp:
Nov 4, 2005, 6:43:46 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: the other jacobi functions doesn't work neither. there is only the possibility to implement it by myself or to search the web for other 2 hours…

Location:
trunk/src/lib/collision_detection
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_detection/lin_alg.h

    r5491 r5493  
    462462
    463463
    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;
    475473//
    476474//   //allocate vectors B, Z
    477 //   vmblock1 = vminit();
     475//   //vmblock1 = vminit();
    478476//   //B = (float *) vmalloc(vmblock1, VEKTOR,  100, 0);
    479477//   //Z = (float *) vmalloc(vmblock1, VEKTOR,  100, 0);
     478//   B = new float[n+1];
     479//   Z = new float[n+1];
    480480//
    481481//    //initialize V to identity matrix
     
    504504//     {
    505505//       //vmfree(vmblock1);
     506//       delete[] B;
     507//       delete[] Z;
    506508//       return;       //normal return
    507509//     }
     
    512514//     for(int k = 1; k < n; k++)
    513515//     {
    514 //       for (iq=ip+1; iq<=N; iq++) {
     516//       for (iq=ip+1; iq<=n; iq++) {
    515517//         g=100*fabs(A[ip][iq]);
    516518// // after 4 sweeps, skip the rotation if the off-diagonal element is small
     
    547549//             A[j][iq] = h+s*(g-h*tau);
    548550//           }
    549 //           for (j=iq+1; j<=N; j++) {
     551//           for (j=iq+1; j<=n; j++) {
    550552//             g=A[ip][j];
    551553//             h=A[iq][j];
     
    553555//             A[iq][j] = h+s*(g-h*tau);
    554556//           }
    555 //           for (j=1; j<=N; j++) {
     557//           for (j=1; j<=n; j++) {
    556558//             g=V[j][ip];
    557559//             h=V[j][iq];
     
    559561//             V[j][iq] = h+s*(g-h*tau);
    560562//           }
    561 //           *NROT=*NROT+1;
     563//           *nRot=*nRot+1;
    562564//         } //end ((i.gt.4)...else if
    563565//       } // main iq loop
    564566//     } // main ip loop
    565 //     for (ip=1; ip<=N; ip++) {
     567//     for (ip=1; ip<=n; ip++) {
    566568//       B[ip] += Z[ip];
    567569//       D[ip]=B[ip];
     
    570572//   } //end of main i loop
    571573//   printf("\n 50 iterations !\n");
    572 //   vmfree(vmblock1);
     574//   //vmfree(vmblock1);
     575//   delete[] Z;
     576//   delete[] B;
    573577//   return;  //too many iterations
    574578// }
  • trunk/src/lib/collision_detection/obb_tree_node.cc

    r5492 r5493  
    385385//   OBBTreeNode::coMat[2][2] = 8;
    386386
    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];
    398398
    399399
Note: See TracChangeset for help on using the changeset viewer.