Changeset 569 for trunk/VUT/GtpVisibilityPreprocessor/src/RssTree.cpp
- Timestamp:
- 01/23/06 15:58:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/RssTree.cpp
r567 r569 336 336 GetRoot(objects[i])->bbox = objects[i]->GetBox(); 337 337 } 338 339 338 stat.nodes = i; 339 stat.leaves = i; 340 340 } else { 341 341 mRoots.resize(1); … … 347 347 mRoots[0] = leaf; 348 348 stat.nodes = 1; 349 stat.leaves = 1; 349 350 } 350 351 … … 356 357 357 358 // first construct a leaf that will get subdivide 358 RssTreeLeaf *leaf = (RssTreeLeaf *) GetRoot(info.Get Object());359 RssTreeLeaf *leaf = (RssTreeLeaf *) GetRoot(info.GetSourceObject()); 359 360 360 361 leaf->AddRay(info); … … 1094 1095 1095 1096 stat.nodes+=2; 1097 stat.leaves += 1; 1096 1098 stat.splits[axis]++; 1097 1099 … … 1410 1412 stack<RayTraversalData> tstack; 1411 1413 1412 RssTreeNode *root = GetRoot(info.Get Object());1414 RssTreeNode *root = GetRoot(info.GetSourceObject()); 1413 1415 tstack.push(RayTraversalData(root, info)); 1414 1416 … … 1550 1552 1551 1553 stat.nodes -= collapsedNodes - 1; 1554 stat.leaves -= collapsedNodes/2 - 1; 1552 1555 stat.rayRefs -= totalRayCount - rayCount; 1553 1556 … … 2771 2774 { 2772 2775 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; 2775 2780 id = mRoots.size()-1; // $$ last tree is used by all unsigned objects 2781 } 2776 2782 return mRoots[id]; 2777 2783 } else
Note: See TracChangeset
for help on using the changeset viewer.