Changeset 1919 for GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
- Timestamp:
- 12/21/06 23:52:10 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/HierarchyManager.cpp
r1917 r1919 2058 2058 int &viewSpaceSplits, 2059 2059 int &objectSpaceSplits, 2060 const bool useFilter) 2060 const bool useFilter, 2061 const bool useHisto, 2062 const int histoMem, 2063 const int pass, 2064 bool &histoUsed) 2061 2065 { 2062 2066 ViewCellContainer viewCells; … … 2121 2125 { 2122 2126 ComputePvs(vc->GetPvs(), rc, pvsEntries); 2127 vc->SetPvsCost(rc); 2123 2128 } 2124 2129 … … 2132 2137 viewSpaceSplits = (int)viewCells.size(); 2133 2138 objectSpaceSplits = (int)bvhNodes.size(); 2139 2140 //////////////////////// 2141 //-- evaluate histogram for pvs size 2142 2143 if (useHisto && (memory <= (float)histoMem)) 2144 { 2145 char str[100]; 2146 char statsPrefix[100]; 2147 int histoStepSize; 2148 2149 Environment::GetSingleton()->GetStringValue("ViewCells.Evaluation.statsPrefix", statsPrefix); 2150 2151 cout << "computing pvs histogram for " << histoMem << " memory" << endl; 2152 Debug << "computing pvs histogram for " << histoMem << " memory" << endl; 2153 2154 sprintf(str, "-%05d-%05d-histo-pvs.log", pass, histoMem); 2155 const string filename = string(statsPrefix) + string(str); 2156 2157 mVspTree->mViewCellsManager->EvalViewCellHistogramForPvsSize(filename, viewCells); 2158 2159 histoUsed = true; 2160 } 2161 2134 2162 //cout << "viewCells: " << (int)viewCells.size() << " nodes: " << (int)bvhNodes.size() << " rc: " << renderCost << " entries: " << pvsEntries << endl; 2135 2163 … … 2325 2353 void HierarchyManager::EvaluateSubdivision2(ofstream &splitsStats, 2326 2354 const int splitsStepSize, 2327 const bool useFilter) 2355 const bool useFilter, 2356 const bool useHisto, 2357 const int histoMem, 2358 const int pass) 2328 2359 { 2329 2360 vector<HierarchySubdivisionStats> subStatsContainer; … … 2331 2362 int splits = (1 + (mHierarchyStats.Leaves() - 1) / splitsStepSize) * splitsStepSize; 2332 2363 cout << "splits: " << splits << endl; 2364 2365 bool histoUsed = false; 2333 2366 2334 2367 while (1) … … 2342 2375 subStats.mViewSpaceSplits, 2343 2376 subStats.mObjectSpaceSplits, 2344 useFilter); 2377 useFilter, 2378 useHisto && !histoUsed, 2379 histoMem, 2380 pass, 2381 histoUsed); 2345 2382 2346 2383
Note: See TracChangeset
for help on using the changeset viewer.