Changeset 667 for GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
- Timestamp:
- 03/01/06 10:31:49 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r666 r667 16 16 #include "RssPreprocessor.h" 17 17 18 #define SAMPLE_AFTER_SUBDIVISION 018 #define SAMPLE_AFTER_SUBDIVISION 1 19 19 20 20 … … 210 210 211 211 // rays can be passed or deleted 212 if (0) // remove!!213 212 disposeRays(initialSamples, outRays); 214 213 … … 216 215 // -- stats after contruction 217 216 ResetViewCells(); 218 Debug << "\nView cells after initial sampling: " << mCurrentViewCellsStats << endl; 217 218 Debug << "\nView cells after initial sampling:\n" << mCurrentViewCellsStats << endl; 219 219 220 220 if (0) // export initial view cells … … 247 247 VssRayContainer constructionSamples; 248 248 249 const int samplingType = mSamplingType;250 /*dirSamples ?249 const int samplingType = 250 dirSamples ? 251 251 Preprocessor::DIRECTION_BASED_DISTRIBUTION : 252 252 Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION; 253 */ 253 254 254 if (0) 255 255 dirSamples = !dirSamples; // toggle sampling method 256 256 257 numSamples += CastPassSamples(mSamplesPerPass, 257 258 samplingType, … … 333 334 } 334 335 335 ViewCellContainer leaves; 336 mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves); 337 mViewCellsTree->ResetPvs(); 338 VssRayContainer dummyRays; 339 CastPassSamples(mInitialSamples, mSamplingType, dummyRays); 340 341 //ComputeSampleContributions(initialSamples, true, false); 342 ComputeSampleContributions(dummyRays, true, false); 343 344 ViewCellContainer::const_iterator it, it_end = leaves.end(); 345 346 for (it = leaves.begin(); it != it_end; ++ it) 347 { 348 mViewCellsTree->PropagatePvs(*it); 349 } 350 351 mViewCellsTree->ExportStats("dummy.log"); 336 if (0) 337 { 338 ViewCellContainer leaves; 339 mViewCellsTree->CollectLeaves(mViewCellsTree->GetRoot(), leaves); 340 mViewCellsTree->ResetPvs(); 341 VssRayContainer dummyRays; 342 CastPassSamples(mInitialSamples, mSamplingType, dummyRays); 343 344 //ComputeSampleContributions(initialSamples, true, false); 345 ComputeSampleContributions(dummyRays, true, false); 346 347 ViewCellContainer::const_iterator it, it_end = leaves.end(); 348 349 for (it = leaves.begin(); it != it_end; ++ it) 350 { 351 mViewCellsTree->PropagatePvs(*it); 352 } 353 354 mViewCellsTree->ExportStats("dummy.log"); 355 } 352 356 353 357 return numSamples; … … 428 432 429 433 // output stats 430 sprintf(s, " Stats-%09d-eval.log", castSamples);434 sprintf(s, "-%09d-eval.log", castSamples); 431 435 string fileName = string(statsPrefix) + string(s); 432 436 … … 899 903 { 900 904 int axis = 0; 901 902 const float factor = 0.65f; 903 Vector3 point = mViewSpaceBox.Min() + mViewSpaceBox.Size() * factor; 905 float pos; 906 907 environment->GetFloatValue("ViewCells.Visualization.clipPlanePos", pos); 908 909 Vector3 point = mViewSpaceBox.Min() + mViewSpaceBox.Size() * pos; 904 910 905 911 if (mUseClipPlaneForViz) … … 2663 2669 2664 2670 //TODO: remove 2665 if (0)2666 mVspBspTree->Construct(constructionRays, &mViewSpaceBox);2671 if (1) 2672 mVspBspTree->Construct(constructionRays, &mViewSpaceBox); 2667 2673 else 2668 mVspBspTree->Construct(rays, &mViewSpaceBox); 2674 mVspBspTree->Construct(rays, &mViewSpaceBox); 2675 2669 2676 // collapse invalid regions 2670 2677 cout << "collapsing invalid tree regions ... "; … … 2747 2754 2748 2755 //BspLeaf::NewMail(); 2749 if ( 0) // export merged view cells2756 if (1) // export merged view cells 2750 2757 { 2751 2758 mColorCode = 0; … … 2778 2785 } 2779 2786 2780 if ( 0) // export merged view cells using pvs coding2787 if (1) // export merged view cells using pvs coding 2781 2788 { 2782 2789 mColorCode = 1;
Note: See TracChangeset
for help on using the changeset viewer.