Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4888 in orxonox.OLD


Ignore:
Timestamp:
Jul 18, 2005, 10:13:41 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: some more debug information, nicer output now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc

    r4887 r4888  
    100100void QuadtreeNode::separateNode(int treeDepth, const int maxDepth)
    101101{
     102  this->treeDepth = treeDepth;
     103  /* debug output */
    102104  for( int i = 0; i < treeDepth; ++i)
    103     PRINT(3)("  ");
    104   PRINT(3)("   +-| (Event) Separating Node Depth: %i/%i\n", treeDepth, maxDepth);
    105 
     105    PRINT(3)(" |");
     106  PRINT(3)(" | +-| (Event) Separating Node Depth: %i/%i\n", treeDepth, maxDepth);
     107
     108  /* dimension calculation & limit checking */
    106109  this->pDimension = this->getDimension();
    107 
    108   this->treeDepth = treeDepth;
    109110  if( treeDepth >= maxDepth)
    110111    return;
    111112
     113  /* node separation */
    112114  this->separateNode();
    113 
    114115  this->nodeA->separateNode(treeDepth + 1, maxDepth);
    115116  this->nodeB->separateNode(treeDepth + 1, maxDepth);
     
    125126void QuadtreeNode::separateNode(float minLength)
    126127{
     128  /* dimension calculation & limit checking */
    127129  this->pDimension = this->getDimension();
    128 
    129130  if( minLength <= this->pDimension->getAxis())
    130131    return;
    131132
     133  /* node separation */
    132134  this->separateNode();
    133 
    134135  this->nodeA->separateNode(minLength);
    135136  this->nodeB->separateNode(minLength);
     
    169170    }
    170171    for( int i = 0; i < treeDepth; ++i)
    171       PRINT(3)("  ");
    172     PRINT(3)("   +-| (II) Quadtree Counts: A: %i, B: %i, C: %i, D: %i\n", listA->getSize(), listB->getSize(), listC->getSize(), listD->getSize());
     172      PRINT(3)(" |");
     173    PRINT(3)(" | +-| (II) Quadtree Counts: A: %i, B: %i, C: %i, D: %i\n", listA->getSize(), listB->getSize(), listC->getSize(), listD->getSize());
    173174
    174175  /* Separating into to the triangle lists  */
     
    309310
    310311  for( int i = 0; i < this->treeDepth; ++i)
    311     PRINT(3)("  ");
    312   PRINT(3)("   +-| (II) Rectangle Dimension  (%f, %f) to (%f, %f), Center (%f, %f)\n", minX, minY, maxX, maxY, rect->getCenter()->x, rect->getCenter()->z, rect->getAxis());
     312    PRINT(3)(" |");
     313  PRINT(3)(" | +-| (II) Rectangle Dimension  (%5.2f, %5.2f) to (%5.2f, %5.2f), Center (%5.2f, %5.2f)\n", minX, minY, maxX, maxY, rect->getCenter()->x, rect->getCenter()->z, rect->getAxis());
    313314  return rect;
    314315}
     
    356357
    357358  for( int i = 0; i < this->treeDepth; ++i)
    358     PRINT(3)("  ");
    359   PRINT(3)("   +-| (II) Rectangle Dimension  (%f, %f) to (%f, %f), Center (%f, %f)\n", minX, minY, maxX, maxY, rect->getCenter()->x, rect->getCenter()->z, rect->getAxis());
     359    PRINT(3)(" |");
     360  PRINT(3)(" | +-| (II) Rectangle Dimension  (%5.2f, %5.2f) to (%5.2f, %5.2f), Center (%5.2f, %5.2f)\n", minX, minY, maxX, maxY, rect->getCenter()->x, rect->getCenter()->z, rect->getAxis());
    360361  return rect;
    361362}
Note: See TracChangeset for help on using the changeset viewer.