Changeset 5044 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Aug 16, 2005, 8:44:55 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r5043 r5044 629 629 if( this->overlapTest(this->bvElement, ((OBBTreeNode*)treeNode)->bvElement, nodeA, nodeB)) 630 630 { 631 PRINTF( 0)("collision @ lvl %i, object %s vs. %s: ", this->depth, nodeA->getClassName(), nodeB->getClassName());631 PRINTF(3)("collision @ lvl %i, object %s vs. %s, (%p, %p)\n", this->depth, nodeA->getClassName(), nodeB->getClassName(), this->nodeLeft, this->nodeRight); 632 632 633 633 /* check if left node overlaps */ 634 634 if( likely( this->nodeLeft != NULL)) 635 635 { 636 PRINT(0)("l, ");637 636 PRINT(3)("Checking OBB %i vs %i: ", this->nodeLeft->getIndex(), treeNode->getIndex()); 638 637 if( this->overlapTest(this->nodeLeft->bvElement, ((OBBTreeNode*)treeNode)->bvElement, nodeA, nodeB)) … … 645 644 if( likely( this->nodeRight != NULL)) 646 645 { 647 PRINT(0)("r, ");648 646 PRINT(3)("Checking OBB %i vs %i: ", this->nodeRight->getIndex(), treeNode->getIndex()); 649 647 if(this->overlapTest(this->nodeRight->bvElement, ((OBBTreeNode*)treeNode)->bvElement, nodeA, nodeB)) … … 652 650 this->nodeRight->collideWith(((OBBTreeNode*)treeNode)->nodeRight, nodeA, nodeB); 653 651 } 654 655 PRINT(0)("\n"); 656 /* so there is a collision and this is the last box in the tree (i.e. leaf) */ 657 if( unlikely(this->nodeRight == NULL && this->nodeLeft == NULL)) 658 { 659 PRINT(0)("COLLISOIN\n"); 660 nodeA->collidesWith(nodeB); 661 nodeB->collidesWith(nodeA); 662 } 663 } 652 } 653 654 /* so there is a collision and this is the last box in the tree (i.e. leaf) */ 655 if( unlikely(this->nodeRight == NULL && this->nodeLeft == NULL)) 656 { 657 nodeA->collidesWith(nodeB); 658 nodeB->collidesWith(nodeA); 659 } 660 664 661 } 665 662 } -
orxonox/trunk/src/story_entities/world.cc
r5038 r5044 756 756 if( this->bQuitCurrentGame || this->bQuitOrxonox) 757 757 break; 758 // Process collision759 this->collide ();760 758 // Process time 761 759 this->tick (); 762 760 // Update the state 763 761 this->update (); 762 // Process collision 763 this->collide (); 764 764 // Draw 765 765 this->display (); -
orxonox/trunk/src/world_entities/npc.cc
r5042 r5044 43 43 void NPC::collidesWith(WorldEntity* entity, const Vector& location) 44 44 { 45 PRINTF(0)("COLLISION ---------------------------- with object: %s\n", entity->getName());45 PRINTF(0)("COLLISION with an NPC\n"); 46 46 } 47 47 -
orxonox/trunk/src/world_entities/world_entity.cc
r5042 r5044 105 105 void WorldEntity::collidesWith(WorldEntity* entity) 106 106 { 107 //this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity);] 108 PRINTF(0)("COLLISION ---------------------------- with object: %s\n", entity->getName()); 107 PRINTF(0)("COLLISION with a WorldEntity\n"); 109 108 } 110 109 … … 118 117 void WorldEntity::collidesWith(WorldEntity* entity, const Vector& location) 119 118 { 120 //this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity);] 121 PRINTF(0)("COLLISION ---------------------------- with object: %s\n", entity->getName()); 119 PRINTF(0)("COLLISION with a WorldEntity\n"); 122 120 } 123 121
Note: See TracChangeset
for help on using the changeset viewer.