Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4913 in orxonox.OLD


Ignore:
Timestamp:
Jul 21, 2005, 9:58:10 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: working on the hash table alg

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  
    7474{
    7575  //this->rootNode->drawTree(depth, drawMode);
    76   for(int i = 0; i < 256; ++i)
     76  for(int i = 0; i < 4; ++i)
    7777  {
    7878    this->nodes[i]->drawTree(0, 0);
  • orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc

    r4912 r4913  
    5252  for( int i = 0; i < this->treeDepth; ++i)
    5353    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);
    5555
    5656  for( int i = 0; i < this->treeDepth; ++i)
     
    8686  for( int i = 0; i < this->treeDepth; ++i)
    8787    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);
    8989
    9090  this->pDimension = this->getDimFromModel();
     
    139139  int loopLimit = (this->nodeIter < elCount)?2:4;
    140140
     141  for( int i = 0; i < this->treeDepth; ++i)
     142    printf(" ");
     143  printf("entering %i: hit counts: %i/%i\n", treeDepth, nodeIter, elCount);
     144
    141145  /* is it a leaf? */
    142146  if( this->treeDepth < this->maxDepth)
     
    156160    for( int j = 0; j < this->treeDepth; ++j)
    157161      printf(" ");
    158     printf("        leaf, index: %i\n", *index);
     162    printf("        leaf, index: %i, pointer: %p\n", *index, this);
    159163    nodeList[(*index)++] = this;
    160164  }
     
    213217    for( int i = 0; i < treeDepth; ++i)
    214218      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());
    216220
    217221  /* Separating into to the triangle lists  */
     
    372376void QuadtreeNode::drawTree(int depth, int drawMode) const
    373377{
    374   if( depth == 0)
     378  printf("this = %p\n", this);
     379  if( this->treeDepth == this->maxDepth)
    375380  {
    376381    Vector t1 = *this->pDimension->getCenter();
     
    386391    glEnd();
    387392  }
     393
     394
    388395  if( this->nodeA != NULL)
    389396    this->nodeA->drawTree(depth - 1, drawMode);
  • orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.cc

    r4898 r4913  
    9999Quadtree* SpatialSeparation::createQuadtree(AbstractModel* model)
    100100{
    101   this->quadtree = new Quadtree(model->getModelInfo(), 4);
     101  this->quadtree = new Quadtree(model->getModelInfo(), 1);
    102102
    103103  return this->quadtree;
Note: See TracChangeset for help on using the changeset viewer.