Changeset 4696 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection
- Timestamp:
- Jun 25, 2005, 12:22:50 AM (19 years ago)
- Location:
- orxonox/trunk/src/lib/collision_detection
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/obb_tree.cc
r4695 r4696 105 105 void OBBTree::collideWith(BVTree* tree) 106 106 { 107 //this->rootNode->collideWith(tree->);107 this->rootNode->collideWith(((OBBTree*)tree)->getRootNode()); 108 108 } 109 109 -
orxonox/trunk/src/lib/collision_detection/obb_tree.h
r4695 r4696 34 34 Material* getTransparentMaterial(unsigned int depth) { return transparentMaterial[depth%5]; } 35 35 int getID() { return ++this->id;} 36 36 inline OBBTreeNode* getRootNode() { return this->rootNode; } 37 37 38 38 void debug(); -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4695 r4696 606 606 void OBBTreeNode::collideWith(BVTreeNode* treeNode) 607 607 { 608 PRINTF(0)("collideWith"); 608 609 /* if the obb overlap, make subtests: check which node is realy overlaping */ 609 610 if( this->overlapTest(this->bvElement, ((OBBTreeNode*)treeNode)->bvElement)) … … 624 625 bool OBBTreeNode::overlapTest(OBB* boxA, OBB* boxB) 625 626 { 626 627 } 627 /* first check all axis */ 628 float r = 0.0f; 629 Vector l = boxA->axis[0]; 630 for(int i = 0; i < 3; ++i) 631 { 632 r += boxA->halfLength[i] * boxA->axis[i].dot(l); 633 } 634 635 printf("r = %f\n", r); 636 /* now check all orthogonals from the axis */ 637 } 638 628 639 629 640
Note: See TracChangeset
for help on using the changeset viewer.