Changeset 4618 in orxonox.OLD for orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
- Timestamp:
- Jun 13, 2005, 9:41:30 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4617 r4618 48 48 { 49 49 this->setClassID(CL_OBB_TREE_NODE, "OBBTreeNode"); 50 50 this->nodeLeft = NULL; 51 this->nodeRight = NULL; 51 52 } 52 53 … … 388 389 389 390 390 void OBBTreeNode::drawBV(int currentDepth, const intdepth) const391 void OBBTreeNode::drawBV(int depth) const 391 392 { 392 393 // glBegin(GL_LINE_LOOP); … … 402 403 403 404 404 void OBBTreeNode::drawBVPolygon(int currentDepth, const intdepth) const405 void OBBTreeNode::drawBVPolygon(int depth) const 405 406 { 406 407 … … 408 409 409 410 /* draw world axes */ 410 glBegin(GL_LINES);411 glColor3f(0.0, 0.4, 0.3);412 glVertex3f(0.0, 0.0, 0.0);413 glVertex3f(3.0, 0.0, 0.0);414 415 glVertex3f(0.0, 0.0, 0.0);416 glVertex3f(0.0, 3.0, 0.0);417 418 glVertex3f(0.0, 0.0, 0.0);419 glVertex3f(0.0, 0.0, 3.0);420 glEnd();411 // glBegin(GL_LINES); 412 // glColor3f(0.0, 0.4, 0.3); 413 // glVertex3f(0.0, 0.0, 0.0); 414 // glVertex3f(3.0, 0.0, 0.0); 415 // 416 // glVertex3f(0.0, 0.0, 0.0); 417 // glVertex3f(0.0, 3.0, 0.0); 418 // 419 // glVertex3f(0.0, 0.0, 0.0); 420 // glVertex3f(0.0, 0.0, 3.0); 421 // glEnd(); 421 422 422 423 423 424 424 425 /* draw the obb axes */ 425 glBegin(GL_LINES);426 glColor3f(0.0, 0.4, 0.3);427 glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);428 glVertex3f(this->bvElement->center->x + this->bvElement->axis[0]->x * this->bvElement->halfLength[0],429 this->bvElement->center->y + this->bvElement->axis[0]->y * this->bvElement->halfLength[0],430 this->bvElement->center->z + this->bvElement->axis[0]->z * this->bvElement->halfLength[0]);431 432 glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);433 glVertex3f(this->bvElement->center->x + this->bvElement->axis[1]->x * this->bvElement->halfLength[1],434 this->bvElement->center->y + this->bvElement->axis[1]->y * this->bvElement->halfLength[1],435 this->bvElement->center->z + this->bvElement->axis[1]->z * this->bvElement->halfLength[1]);436 437 glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z);438 glVertex3f(this->bvElement->center->x + this->bvElement->axis[2]->x * this->bvElement->halfLength[2],439 this->bvElement->center->y + this->bvElement->axis[2]->y * this->bvElement->halfLength[2],440 this->bvElement->center->z + this->bvElement->axis[2]->z * this->bvElement->halfLength[2]);441 glEnd();426 // glBegin(GL_LINES); 427 // glColor3f(0.0, 0.4, 0.3); 428 // glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z); 429 // glVertex3f(this->bvElement->center->x + this->bvElement->axis[0]->x * this->bvElement->halfLength[0], 430 // this->bvElement->center->y + this->bvElement->axis[0]->y * this->bvElement->halfLength[0], 431 // this->bvElement->center->z + this->bvElement->axis[0]->z * this->bvElement->halfLength[0]); 432 // 433 // glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z); 434 // glVertex3f(this->bvElement->center->x + this->bvElement->axis[1]->x * this->bvElement->halfLength[1], 435 // this->bvElement->center->y + this->bvElement->axis[1]->y * this->bvElement->halfLength[1], 436 // this->bvElement->center->z + this->bvElement->axis[1]->z * this->bvElement->halfLength[1]); 437 // 438 // glVertex3f(this->bvElement->center->x, this->bvElement->center->y, this->bvElement->center->z); 439 // glVertex3f(this->bvElement->center->x + this->bvElement->axis[2]->x * this->bvElement->halfLength[2], 440 // this->bvElement->center->y + this->bvElement->axis[2]->y * this->bvElement->halfLength[2], 441 // this->bvElement->center->z + this->bvElement->axis[2]->z * this->bvElement->halfLength[2]); 442 // glEnd(); 442 443 443 444 … … 519 520 glEnd(); 520 521 521 522 } 523 524 525 void OBBTreeNode::drawBVBlended(int currentDepth, const int depth) const 522 if( this->nodeLeft != NULL && depth != 0) 523 this->nodeLeft->drawBVPolygon(depth -1); 524 if( this->nodeRight != NULL && depth != 0) 525 this->nodeRight->drawBVPolygon(depth -1); 526 527 } 528 529 530 void OBBTreeNode::drawBVBlended(int depth) const 526 531 {} 527 532
Note: See TracChangeset
for help on using the changeset viewer.