Changeset 1787 for GTP/trunk/Lib/Vis
- Timestamp:
- 11/24/06 12:05:28 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/BvHierarchy.cpp
r1786 r1787 2159 2159 2160 2160 if (mApplyInitialPartition) 2161 { cout << "here29"<<endl;2161 { 2162 2162 ApplyInitialSubdivision(oSubdivisionCandidate, tQueue); 2163 2163 } … … 2517 2517 tempQueue.Push(firstCandidate); 2518 2518 while (!tempQueue.Empty()) 2519 { cout << "here2"<<endl;2519 { 2520 2520 SubdivisionCandidate *candidate = tempQueue.Top(); 2521 2521 tempQueue.Pop(); … … 2529 2529 if (!InitialTerminationCriteriaMet(bsc->mParentData)) 2530 2530 { 2531 cout << "here12"<<endl;2532 2531 cout << "here9"<<bsc->mParentData.mNode->mObjects.size()<<endl; 2533 2532 BvhNode *node = Subdivide(tempQueue, bsc, globalCriteriaMet); … … 2555 2554 2556 2555 ObjectContainer::const_iterator oit, oit_end = objects->end(); 2557 cout<<"here104"<<endl;2558 for (oit = objects->begin(); oit != objects->end(); ++ oit)2559 { 2560 //cout << (*oit)->GetBox().SurfaceArea() << " ";2561 } 2556 2557 /*for (oit = objects->begin(); oit != objects->end(); ++ oit) 2558 { 2559 cout << (*oit)->GetBox().SurfaceArea() << " "; 2560 }*/ 2562 2561 2563 2562 float maxAreaDiff = -1.0f; … … 2566 2565 2567 2566 for (oit = objects->begin(); oit != (objects->end() - 1); ++ oit) 2568 { //cout << "h";2567 { 2569 2568 Intersectable *objS = *oit; 2570 2569 Intersectable *objL = *(oit + 1); -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1786 r1787 1813 1813 1814 1814 1815 // TODO matt: implement this function for different storing methods 1816 void HierarchyManager::GetPvsIncrementally(ViewCell *vc, ObjectPvs &pvs) const 1815 void HierarchyManager::GetPvsEfficiently(ViewCell *viewCell, ObjectPvs &pvs) const 1817 1816 { 1818 1817 //////////////// … … 1821 1820 // add pvs from leaves 1822 1821 stack<ViewCell *> tstack; 1823 tstack.push(vc); 1822 tstack.push(viewCell); 1823 1824 Intersectable::NewMail(); 1824 1825 1825 1826 while (!tstack.empty()) 1826 1827 { 1827 vc = tstack.top();1828 ViewCell *vc = tstack.top(); 1828 1829 tstack.pop(); 1829 1830 … … 1831 1832 if (!vc->GetPvs().Empty()) 1832 1833 { 1833 if (vc->IsLeaf()) cout << " l " << pvs.GetSize(); 1834 else cout << " i " << pvs.GetSize(); 1835 pvs.MergeInPlace(vc->GetPvs()); 1834 ObjectPvsIterator pit = vc->GetPvs().GetIterator(); 1835 1836 while (pit.HasMoreEntries()) 1837 { 1838 const ObjectPvsEntry &entry = pit.Next(); 1839 1840 Intersectable *object = entry.mObject; 1841 if (!object->Mailed()) 1842 { 1843 object->Mail(); 1844 pvs.AddSampleDirty(object, 1.0f); 1845 } 1846 } 1836 1847 } 1837 1848 else if (!vc->IsLeaf()) // interior cells: go down to leaf level 1838 1849 { 1839 cout <<" t";1840 1850 ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(vc); 1841 1851 ViewCellContainer::const_iterator it, it_end = interior->mChildren.end(); … … 1846 1856 } 1847 1857 } 1858 } 1859 } 1860 1861 1862 // TODO matt: implement this function for different storing methods 1863 void HierarchyManager::GetPvsIncrementially(ViewCell *vc, ObjectPvs &pvs) const 1864 { 1865 //////////////// 1866 //-- pvs is not stored with the interiors => reconstruct 1867 1868 // add pvs from leaves 1869 stack<ViewCell *> tstack; 1870 tstack.push(vc); 1871 1872 while (!tstack.empty()) 1873 { 1874 vc = tstack.top(); 1875 tstack.pop(); 1876 1877 // add newly found pvs to merged pvs: break here even for interior 1878 if (!vc->GetPvs().Empty()) 1879 { 1880 //if (vc->IsLeaf()) cout << " l " << pvs.GetSize(); 1881 //else cout << " i " << pvs.GetSize(); 1882 pvs.MergeInPlace(vc->GetPvs()); 1883 } 1884 else if (!vc->IsLeaf()) // interior cells: go down to leaf level 1885 { 1886 //cout <<" t"; 1887 ViewCellInterior *interior = dynamic_cast<ViewCellInterior *>(vc); 1888 ViewCellContainer::const_iterator it, it_end = interior->mChildren.end(); 1889 1890 for (it = interior->mChildren.begin(); it != it_end; ++ it) 1891 { 1892 tstack.push(*it); 1893 } 1894 } 1848 1895 else cout <<"k"; 1849 1896 } … … 1875 1922 if (!vc->GetPvs().Empty()) 1876 1923 { 1877 /*if (vc->IsLeaf()) 1878 cout << " l " << viewCell->GetPvs().GetSize(); 1879 else cout << " i " << viewCell->GetPvs().GetSize(); 1880 */ 1881 viewCell->GetPvs().MergeInPlace(vc->GetPvs()); 1924 viewCell->GetPvs().MergeInPlace(vc->GetPvs()); 1882 1925 } 1883 1926 else if (!vc->IsLeaf()) // interior cells: go down to leaf level … … 1963 2006 ViewCell::NewMail(); 1964 2007 1965 cout << "\n**************viewcells: " << viewCells.size() << endl;2008 //cout << "\nviewcells: " << viewCells.size() << endl; 1966 2009 for (vit = viewCells.begin(); vit != vit_end; ++ vit) 1967 2010 { 1968 2011 ViewCell *vc = *vit; 1969 1970 //cout << "\nhere5: ";1971 2012 float rc = 0; 1972 2013 1973 2014 #if STUPID_METHOD 1974 2015 ObjectPvs pvs; 1975 GetPvsIncrement ally(vc, pvs);2016 GetPvsIncrementially(vc, pvs); 1976 2017 vc->SetPvs(pvs); 2018 1977 2019 #else 1978 //PullUpPvsIncrementally(vc);2020 1979 2021 ObjectPvs pvs; 1980 GetPvsRecursive(vc, pvs); 1981 vc->SetPvs(pvs); 2022 //GetPvsRecursive(vc, pvs); 2023 2024 // uses mailing 2025 // warning: pvs not sorted!! 2026 if (vc->GetPvs().Empty()) 2027 { 2028 GetPvsEfficiently(vc, pvs); 2029 vc->SetPvs(pvs); 2030 //cout << "q"; 2031 } 2032 //else cout << "t"; 1982 2033 #endif 1983 2034 … … 1991 2042 const long endT = GetTime(); 1992 2043 1993 cout << "filter computed in " << TimeDiff(startT, endT) * 1e-3f << " secs" << endl;2044 //cout << "filter computed in " << TimeDiff(startT, endT) * 1e-3f << " secs" << endl; 1994 2045 ComputePvs(filteredPvs, rc, pvsEntries); 1995 2046 } -
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.h
r1786 r1787 523 523 524 524 void ComputePvs(const ObjectPvs &pvs, float &rc, int &pvsEntries); 525 void GetPvsIncrement ally(ViewCell *vc, ObjectPvs &pvs) const;525 void GetPvsIncrementially(ViewCell *vc, ObjectPvs &pvs) const; 526 526 void PullUpPvsIncrementally(ViewCell *viewCell) const; 527 527 void GetPvsRecursive(ViewCell *vc, ObjectPvs &pvs) const; 528 void GetPvsEfficiently(ViewCell *vc, ObjectPvs &pvs) const; 529 528 530 protected: 529 531 -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1786 r1787 32 32 33 33 // $$JB HACK 34 #define USE_KD_PVS 134 #define USE_KD_PVS 0 35 35 #define KD_PVS_AREA (1e-5f) 36 36 … … 2591 2591 2592 2592 2593 void ViewCellsManager::MergeViewCellsEfficient(ObjectPvs &pvs, const ViewCellContainer &viewCells) const 2594 { 2595 LocalMergeTree mergeTree(viewCells); 2596 mergeTree.Merge(pvs); 2597 } 2593 void ViewCellsManager::MergeViewCellsRecursivly(ObjectPvs &pvs, 2594 const ViewCellContainer &viewCells) const 2595 { 2596 MergeViewCellsRecursivly(pvs, viewCells, 0, (int)viewCells.size() - 1); 2597 } 2598 2599 2600 void ViewCellsManager::MergeViewCellsRecursivly(ObjectPvs &pvs, 2601 const ViewCellContainer &viewCells, 2602 const int leftIdx, 2603 const int rightIdx) const 2604 { 2605 if (leftIdx == rightIdx) 2606 { 2607 pvs = viewCells[leftIdx]->GetPvs(); 2608 } 2609 else 2610 { 2611 const int midSplit = (leftIdx + rightIdx) / 2; 2612 2613 ObjectPvs leftPvs, rightPvs; 2614 MergeViewCellsRecursivly(leftPvs, viewCells, leftIdx, midSplit); 2615 MergeViewCellsRecursivly(rightPvs, viewCells, midSplit, rightIdx); 2616 2617 ObjectPvs::Merge(pvs, leftPvs, rightPvs); 2618 } 2619 } 2620 2598 2621 2599 2622 #if 1 … … 2605 2628 ) 2606 2629 { 2630 cout<<"y"; 2607 2631 PvsFilterStatistics stats; 2608 2632 … … 2629 2653 float samples = (float)basePvs.GetSamples(); 2630 2654 2631 Debug<<"f #s="<<samples<<" pvs size = "<<basePvs.GetSize();2655 Debug<<"f #s="<<samples<<" pvs size = "<<basePvs.GetSize(); 2632 2656 // cout<<"Filter size = "<<filterSize<<endl; 2633 2657 // cout<<"vbox = "<<vbox<<endl; … … 2754 2778 ObjectPvs &pvs 2755 2779 ) 2756 {cout << "x"; 2757 PvsFilterStatistics stats; 2758 2759 AxisAlignedBox3 vbox = GetViewCellBox(viewCell); 2760 Vector3 center = vbox.Center(); 2761 // copy the PVS 2762 ObjectPvs basePvs = viewCell->GetPvs(); 2763 Intersectable::NewMail(); 2764 2765 ObjectPvsIterator pit = basePvs.GetIterator(); 2780 { 2781 cout << "x"; 2782 PvsFilterStatistics stats; 2783 2784 AxisAlignedBox3 vbox = GetViewCellBox(viewCell); 2785 Vector3 center = vbox.Center(); 2786 // copy the PVS 2787 ObjectPvs basePvs;// = viewCell->GetPvs(); 2788 Intersectable::NewMail(); 2789 2790 ObjectPvsIterator pit = viewCell->GetPvs().GetIterator(); 2766 2791 2767 2792 #if !USE_KD_PVS 2768 // first mark all object from this pvs 2769 while (pit.HasMoreEntries()) { 2770 ObjectPvsEntry entry = pit.Next(); 2771 2772 Intersectable *object = entry.mObject; 2773 object->Mail(); 2774 } 2793 // first mark all object from this pvs 2794 while (pit.HasMoreEntries()) 2795 { 2796 ObjectPvsEntry entry = pit.Next(); 2797 2798 Intersectable *object = entry.mObject; 2799 object->Mail(); 2800 } 2775 2801 #endif 2776 2802 2777 2778 2779 float samples = (float)basePvs.GetSamples();2780 2781 Debug<<"f #s="<<samples<<"pvs size = "<<basePvs.GetSize();2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2803 int pvsSize = 0; 2804 int nPvsSize = 0; 2805 float samples = (float)viewCell->GetPvs().GetSamples(); 2806 2807 Debug<<"f #s="<<samples<<"pvs size = "<<viewCell->GetPvs().GetSize(); 2808 // cout<<"Filter size = "<<filterSize<<endl; 2809 // cout<<"vbox = "<<vbox<<endl; 2810 // cout<<"center = "<<center<<endl; 2811 2812 2813 // Minimal number of local samples to take into account 2814 // the local sampling density. 2815 // The size of the filter is a minimum of the conservative 2816 // local sampling density estimate (#rays intersecting teh viewcell and 2817 // the object) 2818 // and gobal estimate for the view cell 2819 // (total #rays intersecting the viewcell) 2794 2820 #define MIN_LOCAL_SAMPLES 5 2795 2821 2796 float viewCellRadius = 0.5f*Magnitude(vbox.Diagonal()); 2797 2798 // now compute the filter box around the current viewCell 2799 2800 if (useViewSpaceFilter) { 2801 // float radius = Max(viewCellRadius/100.0f, avgRadius - viewCellRadius); 2802 float radius = viewCellRadius/100.0f; 2803 vbox.Enlarge(radius); 2804 cout<<"vbox = "<<vbox<<endl; 2805 ViewCellContainer viewCells; 2806 ComputeBoxIntersections(vbox, viewCells); 2807 ObjectPvs pvs; 2808 MergeViewCellsEfficient(pvs, viewCells); 2809 basePvs = pvs; 2810 2811 // update samples and globalC 2812 samples = (float)pvs.GetSamples(); 2813 // cout<<"neighboring viewcells = "<<i-1<<endl; 2814 // cout<<"Samples' = "<<samples<<endl; 2815 } 2816 2817 // Minimal number of samples so that filtering takes place 2822 float viewCellRadius = 0.5f*Magnitude(vbox.Diagonal()); 2823 2824 // now compute the filter box around the current viewCell 2825 2826 if (useViewSpaceFilter) 2827 { 2828 // float radius = Max(viewCellRadius/100.0f, avgRadius - viewCellRadius); 2829 float radius = viewCellRadius/100.0f; 2830 vbox.Enlarge(radius); 2831 cout<<"vbox = "<<vbox<<endl; 2832 ViewCellContainer viewCells; 2833 ComputeBoxIntersections(vbox, viewCells); 2834 2835 MergeViewCellsEfficient(basePvs, viewCells); 2836 cout << "basepvs size " << basePvs.GetSize() << endl; 2837 // update samples and globalC 2838 samples = (float)pvs.GetSamples(); 2839 // cout<<"neighboring viewcells = "<<i-1<<endl; 2840 // cout<<"Samples' = "<<samples<<endl; 2841 } 2842 else 2843 { 2844 basePvs = viewCell->GetPvs(); 2845 } 2846 2847 // Minimal number of samples so that filtering takes place 2818 2848 #define MIN_SAMPLES 100 2819 if (samples > MIN_SAMPLES) { 2820 float globalC = 2.0f*filterSize/sqrt(samples); 2821 2849 if (samples > MIN_SAMPLES) 2850 { 2851 float globalC = 2.0f*filterSize/sqrt(samples); 2852 2853 pit = basePvs.GetIterator(); 2854 2855 ObjectContainer objects; 2856 2857 while (pit.HasMoreEntries()) 2858 { 2859 ObjectPvsEntry entry = pit.Next(); 2860 2861 Intersectable *object = entry.mObject; 2862 // compute filter size based on the distance and the numebr of samples 2863 AxisAlignedBox3 box = object->GetBox(); 2864 2865 float distance = Distance(center, box.Center()); 2866 float globalRadius = distance*globalC; 2867 2868 int objectSamples = (int)entry.mData.mSumPdf; 2869 float localRadius = MAX_FLOAT; 2870 2871 if (objectSamples > MIN_LOCAL_SAMPLES) 2872 { 2873 localRadius = filterSize*0.5f*Magnitude(box.Diagonal())/ 2874 sqrt((float)objectSamples); 2875 } 2876 2877 // cout<<"lr="<<localRadius<<" gr="<<globalRadius<<endl; 2878 2879 // now compute the filter size 2880 float radius; 2881 2882 if (localRadius < globalRadius) 2883 { 2884 radius = localRadius; 2885 stats.mLocalFilterCount++; 2886 } 2887 else 2888 { 2889 radius = globalRadius; 2890 stats.mGlobalFilterCount++; 2891 } 2892 2893 stats.mAvgFilterRadius += radius; 2894 2895 // cout<<"box = "<<box<<endl; 2896 // cout<<"distance = "<<distance<<endl; 2897 // cout<<"radiues = "<<radius<<endl; 2898 2899 box.Enlarge(Vector3(radius)); 2900 objects.clear(); 2901 2902 // $$ warning collect objects takes only unmailed ones! 2903 CollectObjects(box, objects); 2904 2905 // cout<<"collected objects="<<objects.size()<<endl; 2906 ObjectContainer::const_iterator noi = objects.begin(); 2907 for (; noi != objects.end(); ++ noi) 2908 { 2909 Intersectable *o = *noi; 2910 // $$ JB warning: pdfs are not correct at this point! 2911 pvs.AddSampleDirty(o, Limits::Small); 2912 } 2913 } 2914 2915 stats.mAvgFilterRadius /= (stats.mLocalFilterCount + stats.mGlobalFilterCount); 2916 } 2917 2918 Debug<<" nPvs size = "<<pvs.GetSize()<<endl; 2919 2920 #if !USE_KD_PVS 2921 // copy the base pvs to the new pvs 2822 2922 pit = basePvs.GetIterator(); 2823 2824 ObjectContainer objects; 2825 2826 while (pit.HasMoreEntries()) 2827 { 2923 while (pit.HasMoreEntries()) 2924 { 2828 2925 ObjectPvsEntry entry = pit.Next(); 2829 2830 Intersectable *object = entry.mObject; 2831 // compute filter size based on the distance and the numebr of samples 2832 AxisAlignedBox3 box = object->GetBox(); 2833 2834 float distance = Distance(center, box.Center()); 2835 float globalRadius = distance*globalC; 2836 2837 int objectSamples = (int)entry.mData.mSumPdf; 2838 float localRadius = MAX_FLOAT; 2839 if (objectSamples > MIN_LOCAL_SAMPLES) 2840 localRadius = filterSize*0.5f*Magnitude(box.Diagonal())/ 2841 sqrt((float)objectSamples); 2842 2843 // cout<<"lr="<<localRadius<<" gr="<<globalRadius<<endl; 2844 2845 // now compute the filter size 2846 float radius; 2847 2848 if (localRadius < globalRadius) { 2849 radius = localRadius; 2850 stats.mLocalFilterCount++; 2851 } else { 2852 radius = globalRadius; 2853 stats.mGlobalFilterCount++; 2854 } 2855 2856 stats.mAvgFilterRadius += radius; 2857 2858 // cout<<"box = "<<box<<endl; 2859 // cout<<"distance = "<<distance<<endl; 2860 // cout<<"radiues = "<<radius<<endl; 2861 2862 box.Enlarge(Vector3(radius)); 2863 2864 objects.clear(); 2865 // $$ warning collect objects takes only unmailed ones! 2866 CollectObjects(box, objects); 2867 // cout<<"collected objects="<<objects.size()<<endl; 2868 ObjectContainer::const_iterator noi = objects.begin(); 2869 for (; noi != objects.end(); ++ noi) { 2870 Intersectable *o = *noi; 2871 // $$ JB warning: pdfs are not correct at this point! 2872 pvs.AddSampleDirty(o, Limits::Small); 2873 } 2874 } 2875 stats.mAvgFilterRadius /= (stats.mLocalFilterCount + stats.mGlobalFilterCount); 2876 } 2877 2878 Debug<<" nPvs size = "<<pvs.GetSize()<<endl; 2879 2880 #if !USE_KD_PVS 2881 // copy the base pvs to the new pvs 2882 pit = basePvs.GetIterator(); 2883 while (pit.HasMoreEntries()) { 2884 ObjectPvsEntry entry = pit.Next(); 2885 pvs.AddSampleDirty(entry.mObject, entry.mData.mSumPdf); 2886 } 2926 pvs.AddSampleDirty(entry.mObject, entry.mData.mSumPdf); 2927 } 2887 2928 #endif 2888 viewCell->SetFilteredPvsSize(pvs.GetSize()); 2889 2890 Intersectable::NewMail(); 2891 return stats; 2929 viewCell->SetFilteredPvsSize(pvs.GetSize()); 2930 2931 Intersectable::NewMail(); 2932 2933 return stats; 2892 2934 } 2893 2935 #endif 2894 2936 2895 2937 2896 2938 2897 2939 void ViewCellsManager::ExportColor(Exporter *exporter, … … 6227 6269 6228 6270 #if 0 6229 ////////////// //////////////6271 ////////////// 6230 6272 // filtered stats 6231 6273 sprintf(suffix, "-%09d-eval-filter.log", castSamples); … … 6242 6284 cout << "finished in " << timeDiff * 1e-3 << " secs" << endl; 6243 6285 cout << "*************************************" << endl; 6244 6245 Debug << "statistics computed in " << timeDiff * 1e-3 << " secs" << endl; 6286 Debug << "filtered statistics computed in " << timeDiff * 1e-3 << " secs" << endl; 6246 6287 #endif 6247 6288 … … 6260 6301 } 6261 6302 6262 cout << "debug entries: " << pvsSize << ", memcost: " << (float)pvsSize * ObjectPvs::GetEntrySize() << endl; 6303 cout << "debug entries: " << pvsSize << ", memcost: " 6304 << (float)pvsSize * ObjectPvs::GetEntrySize() << endl; 6263 6305 } 6264 6306 } … … 6271 6313 6272 6314 6273 LocalMergeTree::LocalMergeTree(const ViewCellContainer &viewCells): 6274 mViewCells(viewCells) 6275 { 6276 mRoot = Subdivide(0, (int)mViewCells.size()); 6277 } 6278 6279 6280 void LocalMergeTree::Merge(ObjectPvs &mergedPvs) 6281 { 6282 Merge(mRoot, mergedPvs); 6283 } 6284 6285 6286 void LocalMergeTree::Merge(LocalMergeNode *node, ObjectPvs &mergedPvs) 6287 { 6288 //////////////// 6289 //-- pvs is not stored with the interiors => reconstruct 6290 if (node->IsLeaf()) 6291 { 6292 LocalMergeLeaf *leaf = dynamic_cast<LocalMergeLeaf *>(node); 6293 mergedPvs = leaf->mViewCell->GetPvs(); 6294 } 6295 else 6296 { 6297 LocalMergeInterior *interior = dynamic_cast<LocalMergeInterior *>(node); 6298 6299 ObjectPvs leftPvs, rightPvs; 6300 6301 Merge(interior->mLeft, leftPvs); 6302 Merge(interior->mRight, rightPvs); 6303 6304 ObjectPvs::Merge(mergedPvs, leftPvs, rightPvs); 6305 } 6306 } 6307 6308 6309 LocalMergeNode *LocalMergeTree::Subdivide(const int leftIdx, const int rightIdx) 6310 { 6311 if (leftIdx == rightIdx) 6312 { 6313 return new LocalMergeLeaf(mViewCells[leftIdx]); 6314 } 6315 6316 LocalMergeInterior *interior = new LocalMergeInterior(); 6317 6318 const int midSplit = (leftIdx + rightIdx) / 2; 6319 6320 interior->mLeft = Subdivide(leftIdx, midSplit); 6321 interior->mRight = Subdivide(midSplit, rightIdx); 6322 6323 return interior; 6324 } 6325 6326 6327 6328 } 6315 6316 } -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r1786 r1787 75 75 76 76 77 class LocalMergeLeaf: public LocalMergeNode78 {79 public:80 LocalMergeLeaf(ViewCell *vc): mViewCell(vc) {};81 virtual ~LocalMergeLeaf() {};82 virtual bool IsLeaf() const { return true; }83 84 ViewCell *mViewCell;85 };86 87 88 class LocalMergeInterior: public LocalMergeNode89 {90 public:91 92 virtual ~LocalMergeInterior() {DEL_PTR(mLeft); DEL_PTR(mRight);}93 virtual bool IsLeaf() const { return false; }94 95 LocalMergeNode *mLeft;96 LocalMergeNode *mRight;97 };98 99 100 class LocalMergeTree101 {102 public:103 104 LocalMergeTree(const ViewCellContainer &viewCells);105 106 void Merge(ObjectPvs &mergedPvs);107 108 protected:109 110 void Merge(LocalMergeNode *node, ObjectPvs &mergedPvs);111 LocalMergeNode *Subdivide(const int leftIdx, const int rightIdx);112 113 LocalMergeNode *mRoot;114 const ViewCellContainer &mViewCells;115 };116 117 118 77 /** Manages different higher order operations on the view cells. 119 78 */ … … 505 464 /** Efficiently merges the view cells in the container. 506 465 */ 507 void MergeViewCellsEfficient(ObjectPvs &pvs, const ViewCellContainer &viewCells) const; 466 void MergeViewCellsRecursivly(ObjectPvs &pvs, 467 const ViewCellContainer &viewCells) const; 508 468 509 469 … … 606 566 607 567 protected: 568 569 void MergeViewCellsRecursivly(ObjectPvs &pvs, 570 const ViewCellContainer &viewCells, 571 const int leftIdx, 572 const int rightIdx) const; 608 573 609 574 /** Intersects box with the tree and returns the number of intersected boxes.
Note: See TracChangeset
for help on using the changeset viewer.