Changeset 5674 in orxonox.OLD for trunk/src/lib/collision_detection/obb_tree_node.cc
- Timestamp:
- Nov 21, 2005, 4:51:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_detection/obb_tree_node.cc
r5511 r5674 20 20 #include "obb.h" 21 21 #include "obb_tree.h" 22 #include " vector.h"22 #include "matrix.h" 23 23 #include "abstract_model.h" 24 24 #include "world_entity.h" 25 25 26 #include <math.h>27 26 #include "color.h" 28 27 29 28 #include "debug.h" 30 #include "stdincl.h"31 29 #include "lin_alg.h" 32 30 #include "glincl.h" … … 361 359 Vector* axis = new Vector[3]; //!< the references to the obb axis 362 360 363 OBBTreeNode::coMat[0][0] = box->covarianceMatrix[0][0]; 364 OBBTreeNode::coMat[0][1] = box->covarianceMatrix[0][1]; 365 OBBTreeNode::coMat[0][2] = box->covarianceMatrix[0][2]; 366 367 OBBTreeNode::coMat[1][0] = box->covarianceMatrix[1][0]; 368 OBBTreeNode::coMat[1][1] = box->covarianceMatrix[1][1]; 369 OBBTreeNode::coMat[1][2] = box->covarianceMatrix[1][2]; 370 371 OBBTreeNode::coMat[2][0] = box->covarianceMatrix[2][0]; 372 OBBTreeNode::coMat[2][1] = box->covarianceMatrix[2][1]; 373 OBBTreeNode::coMat[2][2] = box->covarianceMatrix[2][2]; 374 375 376 // OBBTreeNode::coMat[0][0] = 1; 377 // OBBTreeNode::coMat[0][1] = 2; 378 // OBBTreeNode::coMat[0][2] = 7; 379 // 380 // OBBTreeNode::coMat[1][0] = 2; 381 // OBBTreeNode::coMat[1][1] = 5; 382 // OBBTreeNode::coMat[1][2] = 5; 383 // 384 // OBBTreeNode::coMat[2][0] = 7; 385 // OBBTreeNode::coMat[2][1] = 5; 386 // OBBTreeNode::coMat[2][2] = 8; 387 388 // OBBTreeNode::coMat[1][1] = box->covarianceMatrix[0][0]; 389 // OBBTreeNode::coMat[1][2] = box->covarianceMatrix[0][1]; 390 // OBBTreeNode::coMat[1][3] = box->covarianceMatrix[0][2]; 391 // 392 // OBBTreeNode::coMat[2][1] = box->covarianceMatrix[1][0]; 393 // OBBTreeNode::coMat[2][2] = box->covarianceMatrix[1][1]; 394 // OBBTreeNode::coMat[2][3] = box->covarianceMatrix[1][2]; 395 // 396 // OBBTreeNode::coMat[3][1] = box->covarianceMatrix[2][0]; 397 // OBBTreeNode::coMat[3][2] = box->covarianceMatrix[2][1]; 398 // OBBTreeNode::coMat[3][3] = box->covarianceMatrix[2][2]; 361 Matrix covMat( box->covarianceMatrix[0][0], box->covarianceMatrix[0][1], box->covarianceMatrix[0][2], 362 box->covarianceMatrix[1][0], box->covarianceMatrix[1][1], box->covarianceMatrix[1][2], 363 box->covarianceMatrix[2][0], box->covarianceMatrix[2][1], box->covarianceMatrix[2][2] ); 364 covMat.getEigenVectors(axis[0], axis[1], axis[2] ); 399 365 400 366 401 367 /* new jacobi tests */ 402 JacobI(OBBTreeNode::coMat, OBBTreeNode::eigvlMat, OBBTreeNode::eigvMat, OBBTreeNode::rotCount);403 PRINTF(3)("-- Done Jacobi Decomposition\n");368 // JacobI(OBBTreeNode::coMat, OBBTreeNode::eigvlMat, OBBTreeNode::eigvMat, OBBTreeNode::rotCount); 369 // PRINTF(3)("-- Done Jacobi Decomposition\n"); 404 370 405 371 … … 415 381 // } 416 382 417 axis[0].x = OBBTreeNode::eigvMat[0][0]; axis[0].y = OBBTreeNode::eigvMat[1][0]; axis[0].z = OBBTreeNode::eigvMat[2][0];383 /* axis[0].x = OBBTreeNode::eigvMat[0][0]; axis[0].y = OBBTreeNode::eigvMat[1][0]; axis[0].z = OBBTreeNode::eigvMat[2][0]; 418 384 axis[1].x = OBBTreeNode::eigvMat[0][1]; axis[1].y = OBBTreeNode::eigvMat[1][1]; axis[1].z = OBBTreeNode::eigvMat[2][1]; 419 385 axis[2].x = OBBTreeNode::eigvMat[0][2]; axis[2].y = OBBTreeNode::eigvMat[1][2]; axis[2].z = OBBTreeNode::eigvMat[2][2]; 420 386 axis[0].normalize(); 421 387 axis[1].normalize(); 422 axis[2].normalize(); 388 axis[2].normalize();*/ 423 389 box->axis = axis; 424 390
Note: See TracChangeset
for help on using the changeset viewer.