Ignore:
Timestamp:
01/23/06 15:58:00 (18 years ago)
Author:
bittner
Message:

viewcell validy setting functions extended

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/VUT/GtpVisibilityPreprocessor/src/RssTree.cpp

    r567 r569  
    336336          GetRoot(objects[i])->bbox = objects[i]->GetBox(); 
    337337        } 
    338  
    339338        stat.nodes = i; 
     339        stat.leaves = i; 
    340340  } else { 
    341341        mRoots.resize(1); 
     
    347347        mRoots[0] = leaf; 
    348348        stat.nodes = 1; 
     349        stat.leaves = 1; 
    349350  } 
    350351 
     
    356357           
    357358          // first construct a leaf that will get subdivide 
    358           RssTreeLeaf *leaf = (RssTreeLeaf *) GetRoot(info.GetObject()); 
     359          RssTreeLeaf *leaf = (RssTreeLeaf *) GetRoot(info.GetSourceObject()); 
    359360 
    360361          leaf->AddRay(info); 
     
    10941095   
    10951096  stat.nodes+=2; 
     1097  stat.leaves += 1; 
    10961098  stat.splits[axis]++; 
    10971099 
     
    14101412  stack<RayTraversalData> tstack; 
    14111413 
    1412   RssTreeNode *root = GetRoot(info.GetObject()); 
     1414  RssTreeNode *root = GetRoot(info.GetSourceObject()); 
    14131415  tstack.push(RayTraversalData(root, info)); 
    14141416   
     
    15501552 
    15511553  stat.nodes -= collapsedNodes - 1; 
     1554  stat.leaves -= collapsedNodes/2 - 1; 
    15521555  stat.rayRefs -= totalRayCount - rayCount; 
    15531556   
     
    27712774{ 
    27722775  if (mPerObjectTree && object) { 
    2773         int id = object->GetId(); 
    2774         if (id >= mRoots.size()) 
     2776        int id = object->GetId()-1; 
     2777        if (id < 0 || id >= mRoots.size()) { 
     2778          Debug<<"Error: object Id out of range, Id="<<id<<" roots.size()="<<mRoots.size()<< 
     2779                endl<<flush; 
    27752780          id = mRoots.size()-1; // $$ last tree is used by all unsigned objects 
     2781        } 
    27762782        return mRoots[id]; 
    27772783  } else 
Note: See TracChangeset for help on using the changeset viewer.