Changeset 4712 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection
- Timestamp:
- Jun 26, 2005, 10:56:45 PM (19 years ago)
- Location:
- orxonox/trunk/src/lib/collision_detection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/bv_tree.h
r4700 r4712 26 26 DRAW_BV_BLENDED = 1<<4, 27 27 DRAW_BV_POLYGON = 1<<5, 28 DRAW_MODEL = 1<<6 28 DRAW_MODEL = 1<<6, 29 DRAW_POINTS = 1<<7 29 30 }; 30 31 -
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4711 r4712 472 472 PRINTF(3)("-- Finished Calculating Attributes\n"); 473 473 474 475 476 // PRINTF(3)("\nwe got length: \n");477 for(int i = 0; i < 3; ++i)478 {479 //if( box->halfLength[i] == 0.0)480 if(fabs(box->halfLength[i]) > 5.0f)481 {482 PRINTF(0)("length[%i] = %f\n", i, box->halfLength[i]);483 PRINTF(0)("MaxLength = %f, MinLength = %f\n", maxLength[i], minLength[i]);484 PRINTF(0)("\nVertex Data:\n");485 for(int i = 0; i < length; i++)486 {487 PRINTF(0)("vertex %i: %f, %f, %f\n", i, box->vertices[i][0], box->vertices[i][1], box->vertices[i][2]);488 }489 }490 }491 474 } 492 475 … … 626 609 /* if the obb overlap, make subtests: check which node is realy overlaping */ 627 610 PRINT(3)("Checking OBB %i vs %i: ", this->getIndex(), treeNode->getIndex()); 611 //if( unlikely()) 628 612 if( this->overlapTest(this->bvElement, ((OBBTreeNode*)treeNode)->bvElement, nodeA, nodeB)) 629 613 { … … 780 764 if( !(drawMode & DRAW_SINGLE && depth != 0)) 781 765 { 766 if( drawMode & DRAW_POINTS) 767 glBegin(GL_POINTS); 782 768 for(int i = 0; i < this->bvElement->numOfVertices; ++i) 783 769 { 784 glPushMatrix(); 785 //glMatrixMode(GL_MODELVIEW); 786 //glVertex3f(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]); 787 glTranslatef(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]); 788 gluSphere(this->sphereObj, 0.1, 10, 10); 789 //PRINTF(0)("v(%f, %f, %f)\n", this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]); 790 glPopMatrix(); 770 if( drawMode & DRAW_POINTS) 771 glVertex3f(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]); 772 else 773 { 774 glPushMatrix(); 775 glTranslatef(this->bvElement->vertices[i][0], this->bvElement->vertices[i][1], this->bvElement->vertices[i][2]); 776 gluSphere(this->sphereObj, 0.1, 10, 10); 777 glPopMatrix(); 778 } 791 779 } 780 if( drawMode & DRAW_POINTS) 781 glEnd(); 792 782 } 793 783 }
Note: See TracChangeset
for help on using the changeset viewer.