Changeset 5115 in orxonox.OLD for trunk/src/lib/collision_detection
- Timestamp:
- Aug 24, 2005, 1:30:13 AM (19 years ago)
- Location:
- trunk/src/lib/collision_detection
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/collision_detection/cd_engine.cc
r5111 r5115 71 71 } 72 72 73 73 #include "class_list.h" 74 #include "state.h" 74 75 /** 75 76 * this checks the collisions with the objects … … 80 81 tIterator<WorldEntity>* iterator1 = entityList->getIterator(); 81 82 tIterator<WorldEntity>* iterator2 = entityList->getIterator(); 82 WorldEntity* entity1 = iterator1->nextElement(); 83 WorldEntity* entity2 = iterator2->seekElement(entity1); 83 WorldEntity* entity1 = iterator1->firstElement(); 84 WorldEntity* entity2 = iterator2->iteratorElement(iterator1); 85 //entity2 = iterator2->nextElement(); 84 86 PRINTF(3)("checking for collisions\n"); 85 87 while( entity1 != NULL) … … 87 89 if( likely(entity1 != this->terrain)) 88 90 { 91 entity2 = iterator2->nextElement(); 92 89 93 while( entity2 != NULL) 90 94 { 91 if( likely(entity2 != this->terrain)) 95 // if (entity2 != NULL) 96 // printf("entity2::%s::%s", entity2->getClassName(), getName()); 97 98 ///////////////// FIXME 99 ///////////////// COMMENTED OUT, because some part of it generated a segfault 100 //////////////// 101 102 /* if( likely(entity2 != this->terrain)) 92 103 { 93 PRINTF( 3)("checking object %s against %s\n", entity1->getName(), entity2->getName());104 PRINTF(4)("checking object %s against %s\n", entity1->getName(), entity2->getName()); 94 105 tree = entity1->getOBBTree(); 95 if( likely(tree != NULL) ) tree->collideWith(entity1, entity2);96 } 106 if( likely(tree != NULL) && entity2->getOBBTree() != NULL) tree->collideWith(entity1, entity2); 107 }*/ 97 108 entity2 = iterator2->nextElement(); 98 109 } 110 // printf("\n"); 99 111 } 100 112 entity1 = iterator1->nextElement(); 101 entity2 = iterator2->seekElement(entity1); 102 113 entity2 = iterator2->iteratorElement(iterator1); 103 114 } 104 115 delete iterator1; … … 133 144 134 145 tIterator<WorldEntity>* iterator = entityList->getIterator(); 135 WorldEntity* entity = iterator-> nextElement();146 WorldEntity* entity = iterator->firstElement(); 136 147 while( entity != NULL) 137 148 { -
trunk/src/lib/collision_detection/obb_tree.cc
r5028 r5115 47 47 { 48 48 this->setClassID(CL_OBB_TREE, "OBBTree"); 49 50 this->rootNode = NULL; 49 51 50 52 material = new Material*[5]; -
trunk/src/lib/collision_detection/obb_tree_node.cc
r5111 r5115 574 574 575 575 iterator = partition1.getIterator(); 576 element = iterator-> nextElement();576 element = iterator->firstElement(); 577 577 index = 0; 578 578 while( element != NULL) … … 592 592 593 593 iterator = partition2.getIterator(); 594 element = iterator-> nextElement();594 element = iterator->firstElement(); 595 595 index = 0; 596 596 while( element != NULL)
Note: See TracChangeset
for help on using the changeset viewer.