- Timestamp:
- Jun 14, 2005, 5:28:21 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4630 r4631 102 102 this->bvElement = new OBB(); 103 103 PRINTF(0)("Created OBBox\n"); 104 this->calculateBoxAttributes(this->bvElement, verticesList, length); 105 PRINTF(0)("Calculated attributes\n"); 104 this->calculateBoxAttributes1(this->bvElement, verticesList, length); 105 PRINTF(0)("Calculated attributes1\n"); 106 this->calculateBoxAttributes2(this->bvElement, verticesList, length); 107 PRINTF(0)("Calculated attributes2\n"); 108 this->calculateBoxAttributes3(this->bvElement, verticesList, length); 109 PRINTF(0)("Calculated attributes3\n"); 106 110 107 111 if( likely( this->depth > 0)) … … 123 127 124 128 125 void OBBTreeNode::calculateBoxAttributes (OBB* box, sVec3D* verticesList, int length)129 void OBBTreeNode::calculateBoxAttributes1(OBB* box, sVec3D* verticesList, int length) 126 130 { 127 131 float facelet[length]; //!< surface area of the i'th triangle of the convex hull … … 180 184 } 181 185 PRINTF(0)("-- Calculated Covariance\n"); 186 return; 182 187 183 188 // printf("\nVertex Data:\n"); … … 209 214 *box->center = center; 210 215 PRINTF(0)("-- Written Result to obb\n"); 216 } 217 218 219 220 void OBBTreeNode::calculateBoxAttributes2(OBB* box, sVec3D* verticesList, int length) 221 { 211 222 212 223 /* now getting spanning vectors of the sub-space: … … 226 237 //eigvMat[0] = new float[4]; eigvMat[1] = new float[4]; eigvMat[2] = new float[4]; eigvMat[3] = new float[4]; 227 238 228 coMat[1][1] = covariance[0][0]; coMat[1][2] = covariance[0][1]; coMat[1][3] = covariance[0][2];229 coMat[2][1] = covariance[1][0]; coMat[2][2] = covariance[1][1]; coMat[2][3] = covariance[1][2];230 coMat[3][1] = covariance[2][0]; coMat[3][2] = covariance[2][1]; coMat[3][3] = covariance[2][2];239 coMat[1][1] = box->covarianceMatrix[0][0]; coMat[1][2] = box->covarianceMatrix[0][1]; coMat[1][3] = box->covarianceMatrix[0][2]; 240 coMat[2][1] = box->covarianceMatrix[1][0]; coMat[2][2] = box->covarianceMatrix[1][1]; coMat[2][3] = box->covarianceMatrix[1][2]; 241 coMat[3][1] = box->covarianceMatrix[2][0]; coMat[3][2] = box->covarianceMatrix[2][1]; coMat[3][3] = box->covarianceMatrix[2][2]; 231 242 232 243 /* new jacobi tests */ … … 265 276 // 266 277 // delete rot; 267 278 } 279 280 void OBBTreeNode::calculateBoxAttributes3(OBB* box, sVec3D* verticesList, int length) 281 { 268 282 269 283 /* now get the axis length */ -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.h
r4630 r4631 41 41 42 42 private: 43 void calculateBoxAttributes(OBB* box, sVec3D* verticesList, int length); 43 void calculateBoxAttributes1(OBB* box, sVec3D* verticesList, int length); 44 void calculateBoxAttributes2(OBB* box, sVec3D* verticesList, int length); 45 void calculateBoxAttributes3(OBB* box, sVec3D* verticesList, int length); 44 46 void forkBox(OBB* box); 45 47 -
orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
r4630 r4631 47 47 // } 48 48 49 CDEngine::getInstance()->debugSpawnTree( 1, model->data->pVertices, model->data->numVertices);49 CDEngine::getInstance()->debugSpawnTree(4, model->data->pVertices, model->data->numVertices); 50 50 51 51 … … 82 82 void Framework::moduleDraw() const 83 83 { 84 CDEngine::getInstance()->drawBV( 1);84 CDEngine::getInstance()->drawBV(3); 85 85 86 86 LightManager::getInstance()->draw();
Note: See TracChangeset
for help on using the changeset viewer.