Changeset 720 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 03/31/06 10:37:45 (19 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
r719 r720 468 468 469 469 // the current view cells are kept in this container 470 // we start with the current view cells from the 471 // view cell manager. They will change with 472 // subsequent merges 473 ViewCellContainer &activeViewCells = mViewCellsManager->GetViewCells(); 474 475 470 // we start with the current view cells from the view cell manager. 471 // The active view cells will change with subsequent merges 472 Debug << "here2" << endl; Debug.flush(); 473 // todo: should rather take initial view cells 474 ViewCellContainer &activeViewCells = mViewCellsManager->GetViewCells(); 475 //ViewCellContainer activeViewCells; 476 477 Debug << "here2.6" << endl; Debug.flush(); 476 478 ViewCell::NewMail(); 477 479 … … 487 489 // frequency stats are updated 488 490 const int statsOut = 500; 489 491 Debug << "here3" << endl; Debug.flush(); 490 492 // passes are needed for statistics, because we don't want to record 491 493 // every merge … … 501 503 int maxMergesPerPass; 502 504 int numMergedViewCells = 0; 503 505 Debug << "here5" << endl; Debug.flush(); 504 506 environment->GetIntValue("ViewCells.PostProcess.maxMergesPerPass", maxMergesPerPass); 505 507 environment->GetFloatValue("ViewCells.PostProcess.avgCostMaxDeviation", avgCostMaxDeviation); … … 537 539 const int numMergedViewCells = UpdateActiveViewCells(activeViewCells); 538 540 539 // refines the view cells 540 // then priorities are recomputed 541 // and the candidates are put back into merge queue 541 542 //-- resets / refines the view cells 543 //-- priorities are recomputed 544 //-- the candidates are put back into merge queue 542 545 if (mRefineViewCells) 543 546 RefineViewCells(rays, objects); -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r719 r720 309 309 disposeRays(initialSamples, outRays); 310 310 311 cout << "testing filter ... "; 312 313 TestFilter(preprocessor->mObjects); 314 315 cout << "finished" << endl; 311 // testing the view cell filter functionality 312 if (0) TestFilter(preprocessor->mObjects); 316 313 317 314 // -- stats after contruction … … 359 356 Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION;*/ 360 357 361 if (0) 362 dirSamples = !dirSamples; // toggle sampling method 358 if (0) dirSamples = !dirSamples; // toggle sampling method 363 359 364 360 numSamples += CastPassSamples(mSamplesPerPass, … … 414 410 ComputeSampleContributions(postProcessSamples, true, storeViewCells); 415 411 416 // mergethe view cells412 //-- post processing (e.g.,merging) of the view cells 417 413 PostProcess(preprocessor->mObjects, postProcessSamples); 418 414 419 // only for testing415 // only for debugging purpose 420 416 if (TEST_EMPTY_VIEW_CELLS) 421 417 CollectEmptyViewCells(); … … 444 440 //SetValidity(0, 99999999999); 445 441 442 443 // evaluation of the paritition, i.e., a number of new samples are cast 446 444 if (mEvaluateViewCells) 447 445 { … … 1136 1134 void ViewCellsManager::UpdatePvs() 1137 1135 { 1138 if (mViewCellPvsIsUpdated )1136 if (mViewCellPvsIsUpdated || !ViewCellsTreeConstructed()) 1139 1137 return; 1140 1138 … … 1245 1243 void ViewCellsManager::ResetViewCells() 1246 1244 { 1245 // recollect view cells 1247 1246 mViewCells.clear(); 1248 1249 1247 CollectViewCells(); 1250 1248 1249 1250 // stats are computed once more 1251 1251 mCurrentViewCellsStats.Reset(); 1252 1252 EvaluateViewCellsStats(); … … 3325 3325 maxPvs = mMaxPvsSize; 3326 3326 } 3327 3327 3328 Debug << "setting validity, min: " << minPvs << " max: " << maxPvs << endl; 3328 3329 cout << "setting validity, min: " << minPvs << " max: " << maxPvs << endl; … … 3331 3332 3332 3333 // update valid view space according to valid view cells 3333 if (0) 3334 mVspBspTree->ValidateTree(); 3335 3336 // has to be recomputed 3334 if (0) mVspBspTree->ValidateTree(); 3335 3336 // area has to be recomputed 3337 3337 mTotalAreaValid = false; 3338 3338 VssRayContainer postProcessRays; … … 3345 3345 // and to correct the rendering statistics 3346 3346 if (0) FinalizeViewCells(false); 3347 3348 3347 3349 3348 //-- merge the individual view cells 3350 3349 MergeViewCells(postProcessRays, objects); 3351 3350 3352 // only for testing 3351 3352 // only for debugging purpose: test if the subdivision is valid 3353 3353 TestSubdivision(); 3354 3354 3355 3355 //-- refines the merged view cells 3356 if (0) 3357 RefineViewCells(postProcessRays, objects); 3356 if (0) RefineViewCells(postProcessRays, objects); 3358 3357 3359 3358 3360 3359 //-- render simulation after merge + refine 3361 3362 3360 cout << "\nevaluating bsp view cells render time before compress ... "; 3363 3361 dynamic_cast<RenderSimulator *>(mRenderer)->RenderScene(); … … 3372 3370 3373 3371 //-- compression 3374 3375 3372 if (ViewCellsTreeConstructed() && mCompressViewCells) 3376 3373 { -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r719 r720 279 279 float GetRendercost(ViewCell *viewCell, float objRendercost) const; 280 280 281 /** Returns container of loaded / generated view cells.281 /** Returns reference to container of loaded / generated view cells. 282 282 */ 283 283 ViewCellContainer &GetViewCells(); -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h
r710 r720 57 57 /// the probability that this node contains view point 58 58 float mProbability; 59 /// geometry of node as induced byplanes59 /// geometry of node induced by half planes 60 60 BspNodeGeometry *mGeometry; 61 61 /// pvs size … … 63 63 /// how often this branch has missed the max-cost ratio 64 64 int mMaxCostMisses; 65 /// if this node is a kd-node (i.e., boundaries are axis aligned 65 /// if this node is a kd-node (i.e., boundaries are axis aligned) 66 66 bool mIsKdNode; 67 // hackfor octree67 /// current split axis: used for octree 68 68 int mAxis; 69 /// for priority traversal: priority of this traversal data 69 70 float mPriority; 70 71
Note: See TracChangeset
for help on using the changeset viewer.