Changeset 1773 for GTP/trunk/Lib/Vis
- Timestamp:
- 11/21/06 03:32:16 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
r1772 r1773 119 119 Environment::GetSingleton()->GetStringValue("ViewCells.samplingType", buf); 120 120 121 // mix of sampling strategies 122 if (0) 123 { 124 mStrategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 125 mStrategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 126 mStrategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 127 } 128 else 129 { 130 mStrategies.push_back(SamplingStrategy::VIEWSPACE_BORDER_BASED_DISTRIBUTION); 131 mStrategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 132 } 133 121 134 // sampling type for view cells construction samples 122 135 if (strcmp(buf, "object") == 0) … … 391 404 cout << "view cell construction: casting " << mInitialSamples << " initial samples ... " << endl; 392 405 393 // mix of sampling strategies394 vector<int> strategies;395 396 if (0)397 {398 strategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION);399 strategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION);400 strategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION);401 }402 else403 {404 strategies.push_back(SamplingStrategy::VIEWSPACE_BORDER_BASED_DISTRIBUTION);405 //strategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION);406 }407 408 406 // cast initial samples 409 CastPassSamples(mInitialSamples, strategies, initialSamples);407 CastPassSamples(mInitialSamples, mStrategies, initialSamples); 410 408 411 409 cout << "finished in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; … … 479 477 // cast new samples 480 478 numSamples += CastPassSamples(mSamplesPerPass, 481 strategies,479 mStrategies, 482 480 constructionSamples); 483 481 … … 521 519 cout << "casting " << mPostProcessSamples << " post processing samples ... "; 522 520 523 CastPassSamples(mPostProcessSamples, strategies, postProcessSamples);521 CastPassSamples(mPostProcessSamples, mStrategies, postProcessSamples); 524 522 525 523 cout << "finished" << endl; … … 566 564 if (0) 567 565 { 568 strategies.clear();569 strategies.push_back(SamplingStrategy::VIEWCELL_BORDER_BASED_DISTRIBUTION);566 mStrategies.clear(); 567 mStrategies.push_back(SamplingStrategy::VIEWCELL_BORDER_BASED_DISTRIBUTION); 570 568 } 571 569 … … 575 573 VssRayContainer visSamples; 576 574 int numSamples = CastPassSamples(mVisualizationSamples, 577 strategies,575 mStrategies, 578 576 visSamples); 579 577 … … 994 992 } 995 993 996 // mix of sampling strategies997 vector<int> strategies;998 999 if (0)1000 {1001 strategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION);1002 strategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION);1003 strategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION);1004 }1005 else1006 {1007 strategies.push_back(SamplingStrategy::VIEWSPACE_BORDER_BASED_DISTRIBUTION);1008 strategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION);1009 }1010 1011 994 cout << "finished" << endl; 1012 995 cout << "Evaluating view cell partition ... " << endl; … … 1025 1008 Debug << "casting " << samplesPerPass << " samples ... "; 1026 1009 1027 CastPassSamples(samplesPerPass, strategies, evaluationSamples);1010 CastPassSamples(samplesPerPass, mStrategies, evaluationSamples); 1028 1011 1029 1012 castSamples += samplesPerPass; … … 5994 5977 Debug << "view cell stats prefix: " << statsPrefix << endl; 5995 5978 5996 // mix of sampling strategies 5997 vector<int> strategies; 5998 5999 if (0) 6000 { 6001 strategies.push_back(SamplingStrategy::OBJECT_BASED_DISTRIBUTION); 6002 strategies.push_back(SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION); 6003 strategies.push_back(SamplingStrategy::REVERSE_OBJECT_BASED_DISTRIBUTION); 6004 } 6005 else 6006 { 6007 strategies.push_back(SamplingStrategy::VIEWSPACE_BORDER_BASED_DISTRIBUTION); 6008 strategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 6009 } 6010 6011 cout << "reseting pvs ... "; 5979 cout << "reseting pvs ... "; 6012 5980 6013 5981 // reset pvs and start over from zero … … 6030 5998 Debug << "casting " << samplesPerPass << " samples ... "; 6031 5999 6032 CastPassSamples(samplesPerPass, strategies, evaluationSamples);6000 CastPassSamples(samplesPerPass, mStrategies, evaluationSamples); 6033 6001 6034 6002 castSamples += samplesPerPass; -
GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h
r1768 r1773 43 43 44 44 struct PvsFilterStatistics { 45 PvsFilterStatistics(): mAvgFilterRadius(0.0f), mLocalFilterCount(0), mGlobalFilterCount(0) {} 45 PvsFilterStatistics(): 46 mAvgFilterRadius(0.0f), mLocalFilterCount(0), mGlobalFilterCount(0) {} 46 47 float mAvgFilterRadius; 47 48 int mLocalFilterCount; … … 613 614 /** Sets exporter color. 614 615 */ 615 virtual void ExportColor(Exporter *exporter, ViewCell *vc, const bool colorCode) const; 616 virtual void ExportColor(Exporter *exporter, 617 ViewCell *vc, 618 const bool colorCode) const; 616 619 617 620 /** Creates meshes from the view cells. … … 669 672 ViewCellsTree *mViewCellsTree; 670 673 674 std::vector<int> mStrategies; 675 671 676 /** if the values in the view cell leaves and the interiors are up to date 672 677 this is meant for lazy storing of the pvs, where only a scalar indicating -
GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
r1772 r1773 2128 2128 //-- pvs rendering heuristics 2129 2129 2130 const int lowerPvsLimit =mViewCellsManager->GetMinPvsSize();2131 const int upperPvsLimit =mViewCellsManager->GetMaxPvsSize();2130 const float lowerPvsLimit = (float)mViewCellsManager->GetMinPvsSize(); 2131 const float upperPvsLimit = (float)mViewCellsManager->GetMaxPvsSize(); 2132 2132 2133 2133 // only render cost heuristics or combined with standard deviation
Note: See TracChangeset
for help on using the changeset viewer.