Changeset 5431 in orxonox.OLD for trunk/src/lib/collision_detection
- Timestamp:
- Oct 24, 2005, 11:54:17 PM (19 years ago)
- Location:
- trunk/src/lib/collision_detection
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_detection/obb_tree.h
r5039 r5431 36 36 Material* getTransparentMaterial(unsigned int depth) { return this->transparentMaterial[depth%5]; } 37 37 Material* getCollisionMaterial() { return this->collisionMaterial; } 38 38 39 int getID() { return ++this->id;} 39 40 inline OBBTreeNode* getRootNode() { return this->rootNode; } -
trunk/src/lib/collision_detection/obb_tree_node.cc
r5430 r5431 29 29 30 30 #include "lin_alg.h" 31 31 #include "glincl.h" 32 32 33 33 … … 37 37 OBBTree* OBBTreeNode::obbTree = NULL; 38 38 39 float** OBBTreeNode _coMat = NULL;40 float** OBBTreeNode _eigvMat = NULL;41 float* OBBTreeNode _eigvlMat = NULL;42 int* OBBTreeNode _rotCount = NULL;39 float** OBBTreeNode::coMat = NULL; 40 float** OBBTreeNode::eigvMat = NULL; 41 float* OBBTreeNode::eigvlMat = NULL; 42 int* OBBTreeNode::rotCount = NULL; 43 43 GLUquadricObj* OBBTreeNode_sphereObj = NULL; 44 44 … … 53 53 this->bvElement = NULL; 54 54 55 if(OBBTreeNode _coMat == NULL)56 { 57 OBBTreeNode _coMat = new float*[4];55 if(OBBTreeNode::coMat == NULL) 56 { 57 OBBTreeNode::coMat = new float*[4]; 58 58 for(int i = 0; i < 4; i++) 59 OBBTreeNode _coMat[i] = new float[4];60 } 61 if(OBBTreeNode _eigvMat == NULL)62 { 63 OBBTreeNode _eigvMat = new float*[4];59 OBBTreeNode::coMat[i] = new float[4]; 60 } 61 if(OBBTreeNode::eigvMat == NULL) 62 { 63 OBBTreeNode::eigvMat = new float*[4]; 64 64 for(int i = 0; i < 4; i++) 65 OBBTreeNode _eigvMat[i] = new float[4];66 } 67 if( OBBTreeNode _eigvlMat == NULL)68 { 69 OBBTreeNode _eigvlMat = new float[4];70 } 71 if( OBBTreeNode _rotCount == NULL)72 OBBTreeNode _rotCount = new int;65 OBBTreeNode::eigvMat[i] = new float[4]; 66 } 67 if( OBBTreeNode::eigvlMat == NULL) 68 { 69 OBBTreeNode::eigvlMat = new float[4]; 70 } 71 if( OBBTreeNode::rotCount == NULL) 72 OBBTreeNode::rotCount = new int; 73 73 74 74 if (OBBTreeNode_sphereObj == NULL) … … 360 360 Vector* axis = new Vector[3]; //!< the references to the obb axis 361 361 362 OBBTreeNode _coMat[1][1] = box->covarianceMatrix[0][0]; OBBTreeNode_coMat[1][2] = box->covarianceMatrix[0][1]; OBBTreeNode_coMat[1][3] = box->covarianceMatrix[0][2];363 OBBTreeNode _coMat[2][1] = box->covarianceMatrix[1][0]; OBBTreeNode_coMat[2][2] = box->covarianceMatrix[1][1]; OBBTreeNode_coMat[2][3] = box->covarianceMatrix[1][2];364 OBBTreeNode _coMat[3][1] = box->covarianceMatrix[2][0]; OBBTreeNode_coMat[3][2] = box->covarianceMatrix[2][1]; OBBTreeNode_coMat[3][3] = box->covarianceMatrix[2][2];362 OBBTreeNode::coMat[1][1] = box->covarianceMatrix[0][0]; OBBTreeNode::coMat[1][2] = box->covarianceMatrix[0][1]; OBBTreeNode::coMat[1][3] = box->covarianceMatrix[0][2]; 363 OBBTreeNode::coMat[2][1] = box->covarianceMatrix[1][0]; OBBTreeNode::coMat[2][2] = box->covarianceMatrix[1][1]; OBBTreeNode::coMat[2][3] = box->covarianceMatrix[1][2]; 364 OBBTreeNode::coMat[3][1] = box->covarianceMatrix[2][0]; OBBTreeNode::coMat[3][2] = box->covarianceMatrix[2][1]; OBBTreeNode::coMat[3][3] = box->covarianceMatrix[2][2]; 365 365 366 366 // OBBTreeNode::coMat[0][0] = box->covarianceMatrix[0][0]; … … 378 378 379 379 /* new jacobi tests */ 380 JacobI(OBBTreeNode _coMat, 3, OBBTreeNode_eigvlMat, OBBTreeNode_eigvMat, OBBTreeNode_rotCount);380 JacobI(OBBTreeNode::coMat, 3, OBBTreeNode::eigvlMat, OBBTreeNode::eigvMat, OBBTreeNode::rotCount); 381 381 PRINTF(3)("-- Done Jacobi Decomposition\n"); 382 382 … … 388 388 // for(int k = 1; k < 4; ++k) 389 389 // { 390 // PRINTF(3)(" \b%f ", OBBTreeNode _OBBTreeNode_eigvMat[j][k]);390 // PRINTF(3)(" \b%f ", OBBTreeNode::OBBTreeNode::eigvMat[j][k]); 391 391 // } 392 392 // PRINTF(3)(" |\n"); 393 393 // } 394 394 395 axis[0].x = OBBTreeNode _eigvMat[1][1]; axis[0].y = OBBTreeNode_eigvMat[2][1]; axis[0].z = OBBTreeNode_eigvMat[3][1];396 axis[1].x = OBBTreeNode _eigvMat[1][2]; axis[1].y = OBBTreeNode_eigvMat[2][2]; axis[1].z = OBBTreeNode_eigvMat[3][2];397 axis[2].x = OBBTreeNode _eigvMat[1][3]; axis[2].y = OBBTreeNode_eigvMat[2][3]; axis[2].z = OBBTreeNode_eigvMat[3][3];395 axis[0].x = OBBTreeNode::eigvMat[1][1]; axis[0].y = OBBTreeNode::eigvMat[2][1]; axis[0].z = OBBTreeNode::eigvMat[3][1]; 396 axis[1].x = OBBTreeNode::eigvMat[1][2]; axis[1].y = OBBTreeNode::eigvMat[2][2]; axis[1].z = OBBTreeNode::eigvMat[3][2]; 397 axis[2].x = OBBTreeNode::eigvMat[1][3]; axis[2].y = OBBTreeNode::eigvMat[2][3]; axis[2].z = OBBTreeNode::eigvMat[3][3]; 398 398 axis[0].normalize(); 399 399 axis[1].normalize(); -
trunk/src/lib/collision_detection/obb_tree_node.h
r5430 r5431 8 8 #define _OBB_TREE_NODE_H 9 9 10 #include "glincl.h"11 10 #include "bv_tree_node.h" 12 11 … … 69 68 int tmpLen1; //!< len vert data obbox1 70 69 int tmpLen2; //!< len vert data obbox2 70 71 static float** coMat; 72 static float** eigvMat; 73 static float* eigvlMat; 74 static int* rotCount; 71 75 }; 72 76
Note: See TracChangeset
for help on using the changeset viewer.