Changeset 4921 in orxonox.OLD for orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
- Timestamp:
- Jul 21, 2005, 3:32:54 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
r4920 r4921 102 102 this->offset = 0.0f; 103 103 this->nodeIter = -1; 104 this->bDraw = false; 104 105 105 106 this->parent = NULL; … … 366 367 else 367 368 printf("POINT IS NOT INSIEDE\n"); 369 this->bDraw = true; 368 370 } 369 371 … … 379 381 float h = 50.0f; 380 382 383 //printf("draw @ %f, %f to %f, %f", t1.x + ax, t1.z + ax, t1.x - ax, t1.z - ax); 384 385 this->quadtree->getMaterial(this->indexNode)->select(); 381 386 glBegin(GL_QUADS); 382 this->quadtree->getMaterial(this->indexNode)->select();383 387 glVertex3f(t1.x + ax, h - depth * 10.0f, t1.z + ax); 384 388 glVertex3f(t1.x - ax, h - depth * 10.0f, t1.z + ax); … … 398 402 this->nodeD->drawTree(depth - 1, drawMode); 399 403 } 404 405 void QuadtreeNode::draw() const 406 { 407 if( likely(!bDraw)) 408 return; 409 Vector t1 = *this->pDimension->getCenter(); 410 float ax = this->pDimension->getAxis(); 411 float h = 70.0f; 412 413 //printf("draw @ %f, %f to %f, %f", t1.x + ax, t1.z + ax, t1.x - ax, t1.z - ax); 414 415 glBegin(GL_QUADS); 416 this->quadtree->getMaterial(this->indexNode)->select(); 417 // for( int i = 0; i < 50; ++i) 418 // { 419 int i = 0; 420 glVertex3f(t1.x + ax, h + 10.0f * i, t1.z + ax); 421 glVertex3f(t1.x - ax, h + 10.0f * i, t1.z + ax); 422 glVertex3f(t1.x - ax, h + 10.0f * i, t1.z - ax); 423 glVertex3f(t1.x + ax, h + 10.0f * i, t1.z - ax); 424 // } 425 glEnd(); 426 427 }
Note: See TracChangeset
for help on using the changeset viewer.