Changeset 4913 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Jul 21, 2005, 9:58:10 AM (19 years ago)
- Location:
- orxonox/trunk/src/lib/graphics/spatial_separation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree.cc
r4912 r4913 74 74 { 75 75 //this->rootNode->drawTree(depth, drawMode); 76 for(int i = 0; i < 256; ++i)76 for(int i = 0; i < 4; ++i) 77 77 { 78 78 this->nodes[i]->drawTree(0, 0); -
orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
r4912 r4913 52 52 for( int i = 0; i < this->treeDepth; ++i) 53 53 PRINT(3)(" |"); 54 PRINT(3)(" | +-| (Event) Separating Node Nr. %i Depth: %i/%i\n", this->indexNode, treeDepth, maxDepth);54 PRINT(3)(" | +-| (Event) Building Node Nr. %i Depth: %i/%i, pointer: %p\n", this->indexNode, treeDepth, maxDepth, this); 55 55 56 56 for( int i = 0; i < this->treeDepth; ++i) … … 86 86 for( int i = 0; i < this->treeDepth; ++i) 87 87 PRINT(3)(" |"); 88 PRINT(3)(" | +-| (Event) Separating Node Nr. %i Depth: %i/%i\n", this->indexNode, treeDepth, maxDepth);88 PRINT(3)(" | +-| (Event) Building Node Nr. %i Depth: %i/%i, pointer: %p\n", this->indexNode, treeDepth, maxDepth, this); 89 89 90 90 this->pDimension = this->getDimFromModel(); … … 139 139 int loopLimit = (this->nodeIter < elCount)?2:4; 140 140 141 for( int i = 0; i < this->treeDepth; ++i) 142 printf(" "); 143 printf("entering %i: hit counts: %i/%i\n", treeDepth, nodeIter, elCount); 144 141 145 /* is it a leaf? */ 142 146 if( this->treeDepth < this->maxDepth) … … 156 160 for( int j = 0; j < this->treeDepth; ++j) 157 161 printf(" "); 158 printf(" leaf, index: %i \n", *index);162 printf(" leaf, index: %i, pointer: %p\n", *index, this); 159 163 nodeList[(*index)++] = this; 160 164 } … … 213 217 for( int i = 0; i < treeDepth; ++i) 214 218 PRINT(3)(" |"); 215 PRINT(3)(" | +-| (II) Quadtree Counts : A: %i, B: %i, C: %i, D: %i\n", listA->getSize(), listB->getSize(), listC->getSize(), listD->getSize());219 PRINT(3)(" | +-| (II) Quadtree Counts - separating: A: %i, B: %i, C: %i, D: %i\n", listA->getSize(), listB->getSize(), listC->getSize(), listD->getSize()); 216 220 217 221 /* Separating into to the triangle lists */ … … 372 376 void QuadtreeNode::drawTree(int depth, int drawMode) const 373 377 { 374 if( depth == 0) 378 printf("this = %p\n", this); 379 if( this->treeDepth == this->maxDepth) 375 380 { 376 381 Vector t1 = *this->pDimension->getCenter(); … … 386 391 glEnd(); 387 392 } 393 394 388 395 if( this->nodeA != NULL) 389 396 this->nodeA->drawTree(depth - 1, drawMode); -
orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.cc
r4898 r4913 99 99 Quadtree* SpatialSeparation::createQuadtree(AbstractModel* model) 100 100 { 101 this->quadtree = new Quadtree(model->getModelInfo(), 4);101 this->quadtree = new Quadtree(model->getModelInfo(), 1); 102 102 103 103 return this->quadtree;
Note: See TracChangeset
for help on using the changeset viewer.