Changeset 590 for trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp
- Timestamp:
- 02/04/06 21:36:40 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/VspBspTree.cpp
r589 r590 17 17 #include "ViewCellsManager.h" 18 18 #include "Beam.h" 19 19 20 20 21 //-- static members … … 1741 1742 void VspBspTree::CollapseViewCells() 1742 1743 { 1744 // TODO 1745 #if VC_HISTORY 1743 1746 stack<BspNode *> nodeStack; 1744 1747 … … 1762 1765 1763 1766 ViewCellContainer leaves; 1764 mViewCells Manager->GetViewCellsTree()->CollectLeaves(viewCell, leaves);1767 mViewCellsTree->CollectLeaves(viewCell, leaves); 1765 1768 1766 1769 ViewCellContainer::const_iterator it, it_end = leaves.end(); … … 1788 1791 1789 1792 Debug << "invalid leaves: " << mBspStats.invalidLeaves << endl; 1793 #endif 1790 1794 } 1791 1795 … … 1855 1859 if (!onlyValid || node->TreeValid()) 1856 1860 { 1857 ViewCell *viewCell = dynamic_cast<BspLeaf *>(node)->GetViewCell(); 1858 1861 ViewCell *viewCell = 1862 mViewCellsTree->GetActiveViewCell(dynamic_cast<BspLeaf *>(node)->GetViewCell()); 1863 1859 1864 if (!onlyUnmailed || !viewCell->Mailed()) 1860 1865 { … … 1872 1877 } 1873 1878 } 1879 1874 1880 } 1875 1881 … … 2058 2064 { 2059 2065 ViewCellContainer leaves; 2060 mViewCellsManager->GetViewCellsTree()->CollectLeaves(vc, leaves); 2066 2067 mViewCellsTree->CollectLeaves(vc, leaves); 2061 2068 2062 2069 ViewCellContainer::const_iterator it, it_end = leaves.end(); … … 2065 2072 { 2066 2073 BspLeaf *l = dynamic_cast<BspViewCell *>(*it)->mLeaf; 2074 2067 2075 ConstructGeometry(l, vcGeom); 2068 2076 } … … 2433 2441 BspLeaf *leaf = dynamic_cast<BspLeaf *>(node); 2434 2442 2435 if (!leaf->GetViewCell()->Mailed()) 2436 { 2437 viewcells.push_back(leaf->GetViewCell()); 2438 leaf->GetViewCell()->Mail(); 2443 ViewCell *viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell()); 2444 if (!viewCell->Mailed()) 2445 { 2446 viewcells.push_back(viewCell); 2447 viewCell->Mail(); 2439 2448 ++ hits; 2440 2449 } … … 2497 2506 BspNode *VspBspTree::CollapseTree(BspNode *node, int &collapsed) 2498 2507 { 2508 // TODO 2509 #if VC_HISTORY 2499 2510 if (node->IsLeaf()) 2500 2511 return node; … … 2530 2541 } 2531 2542 } 2532 2543 #endif 2533 2544 return node; 2534 2545 } … … 2551 2562 void VspBspTree::RepairViewCellsLeafLists() 2552 2563 { 2564 // TODO 2565 #if VC_HISTORY 2553 2566 // list not valid anymore => clear 2554 2567 stack<BspNode *> nodeStack; … … 2567 2580 2568 2581 BspViewCell *viewCell = leaf->GetViewCell(); 2569 // TODO 2570 #if VC_HISTORY 2582 2571 2583 if (!viewCell->Mailed()) 2572 2584 { … … 2576 2588 2577 2589 viewCell->mLeaves.push_back(leaf); 2590 2591 } 2592 else 2593 { 2594 BspInterior *interior = dynamic_cast<BspInterior *>(node); 2595 2596 nodeStack.push(interior->GetFront()); 2597 nodeStack.push(interior->GetBack()); 2598 } 2599 } 2578 2600 // TODO 2579 2601 #endif 2580 }2581 else2582 {2583 BspInterior *interior = dynamic_cast<BspInterior *>(node);2584 2585 nodeStack.push(interior->GetFront());2586 nodeStack.push(interior->GetBack());2587 }2588 }2589 2602 } 2590 2603 … … 2929 2942 { 2930 2943 BspLeaf *leaf = dynamic_cast<BspLeaf *>(node); 2931 2944 ViewCell *viewCell = mViewCellsTree->GetActiveViewCell(leaf->GetViewCell()); 2945 2932 2946 int id = -1; 2933 if ( leaf->GetViewCell()!= mOutOfBoundsCell)2934 id = leaf->GetViewCell()->GetId();2947 if (viewCell != mOutOfBoundsCell) 2948 id = viewCell->GetId(); 2935 2949 2936 2950 stream << "<Leaf viewCellId=\"" << id << "\" />" << endl;
Note: See TracChangeset
for help on using the changeset viewer.