Changeset 5702 in orxonox.OLD for branches/collision_detection/src/lib/collision_detection/obb_tree_node.cc
- Timestamp:
- Nov 22, 2005, 1:11:06 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/collision_detection/src/lib/collision_detection/obb_tree_node.cc
r5699 r5702 111 111 * on the triangle informations (triangle soup not polygon soup) 112 112 */ 113 void OBBTreeNode::spawnBVTree(const int depth, const modelInfo& mod Info)114 { 115 int length = 0; 113 void OBBTreeNode::spawnBVTree(const int depth, const modelInfo& modelInf, 114 const int* triangleIndexes, unsigned int length) 115 { 116 116 sVec3D* verticesList; 117 117 … … 123 123 124 124 this->bvElement = new OBB(); 125 this->bvElement->vertices = verticesList; 126 this->bvElement->numOfVertices = length; 125 126 this->bvElement->modelInf = &modelInf; 127 this->bvElement->triangleIndexes = triangleIndexes; 128 this->bvElement->numTriangles = length; 129 127 130 PRINTF(3)("Created OBBox\n"); 128 this->calculateBoxCovariance(this->bvElement, mod Info);131 this->calculateBoxCovariance(this->bvElement, modelInf, triangleIndexes, length); 129 132 PRINTF(3)("Calculated attributes1\n"); 130 this->calculateBoxEigenvectors(this->bvElement, mod Info);133 this->calculateBoxEigenvectors(this->bvElement, modelInf, triangleIndexes, length); 131 134 PRINTF(3)("Calculated attributes2\n"); 132 this->calculateBoxAxis(this->bvElement, modInfo);135 this->calculateBoxAxis(this->bvElement, modelInf, triangleIndexes, length); 133 136 PRINTF(3)("Calculated attributes3\n"); 134 137 … … 228 231 229 232 230 void OBBTreeNode::calculateBoxCovariance(OBB* box, const modelInfo& modInfo )233 void OBBTreeNode::calculateBoxCovariance(OBB* box, const modelInfo& modInfo, const int* triangleIndexes, unsigned int length) 231 234 {} 232 235 … … 421 424 422 425 423 void OBBTreeNode::calculateBoxEigenvectors(OBB* box, const modelInfo& modInfo) 426 void OBBTreeNode::calculateBoxEigenvectors(OBB* box, const modelInfo& modInfo, 427 const int* triangleIndexes, unsigned int length) 424 428 {} 425 429 … … 473 477 474 478 475 void OBBTreeNode::calculateBoxAxis(OBB* box, const modelInfo& modInfo )479 void OBBTreeNode::calculateBoxAxis(OBB* box, const modelInfo& modInfo, const int* triangleIndexes, unsigned int length) 476 480 { 477 481 this->calculateBoxAxis(box, (const sVec3D*)modInfo.pVertices, modInfo.numVertices);
Note: See TracChangeset
for help on using the changeset viewer.