Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4899 in orxonox.OLD


Ignore:
Timestamp:
Jul 19, 2005, 10:05:30 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: again some very fundamental changes in the tree spawing algorithm. some strange effects left

Location:
orxonox/trunk/src/lib/graphics/spatial_separation
Files:
2 edited

Legend:

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

    r4898 r4899  
    3737  this->pVertices = pVertices;
    3838  this->numVertices = numVertices;
     39
    3940  this->quadtree = quadtree;
    40   this->treeDepth = 0;
    4141  this->parent = parent;
     42
    4243  this->pDimension = rect;
    4344  this->treeDepth = treeDepth;
     
    9495
    9596  this->offset = 0.0f;
     97
    9698  this->parent = NULL;
    9799  this->nodeA = NULL;
     
    100102  this->nodeD = NULL;
    101103
    102   this->separateNode(this->treeDepth, this->maxDepth);
     104  if( this->treeDepth < this->maxDepth)
     105    this->separateNode();
    103106}
    104107
     
    120123
    121124
    122 /**
    123  *  gives the signal to separate the model into a quadtree
    124  * @param treeDepth the max depth, the steps to go if treeDept == 0 leaf reached
    125  */
    126 void QuadtreeNode::separateNode(int treeDepth, const int maxDepth)
    127 {
    128 
    129 
    130   /* dimension calculation & limit checking */
    131 
    132   if( treeDepth >= maxDepth)
    133     return;
    134 
    135   /* node separation */
    136   this->separateNode();
    137 
    138 //   this->nodeA->separateNode(treeDepth + 1, maxDepth);
    139 //   this->nodeB->separateNode(treeDepth + 1, maxDepth);
    140 //   this->nodeC->separateNode(treeDepth + 1, maxDepth);
    141 //   this->nodeD->separateNode(treeDepth + 1, maxDepth);
    142 }
    143 
    144125
    145126/**
     
    154135
    155136  /* node separation */
    156   this->separateNode();
    157   this->nodeA->separateNode(minLength);
    158   this->nodeB->separateNode(minLength);
    159   this->nodeC->separateNode(minLength);
    160   this->nodeD->separateNode(minLength);
     137//   this->separateNode();
     138//   this->nodeA->separateNode(minLength);
     139//   this->nodeB->separateNode(minLength);
     140//   this->nodeC->separateNode(minLength);
     141//   this->nodeD->separateNode(minLength);
    161142}
    162143
  • orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.h

    r4898 r4899  
    3333    void init();
    3434
    35     void separateNode(int treeDepth, const int maxDepth);
    3635    void separateNode(float minLength);
    3736    void separateNode();
Note: See TracChangeset for help on using the changeset viewer.