Changeset 1773


Ignore:
Timestamp:
11/21/06 03:32:16 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r1772 r1773  
    119119        Environment::GetSingleton()->GetStringValue("ViewCells.samplingType", buf); 
    120120 
     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 
    121134        // sampling type for view cells construction samples 
    122135        if (strcmp(buf, "object") == 0) 
     
    391404        cout << "view cell construction: casting " << mInitialSamples << " initial samples ... " << endl; 
    392405 
    393         // mix of sampling strategies 
    394         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         else 
    403         { 
    404                 strategies.push_back(SamplingStrategy::VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
    405                 //strategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
    406         } 
    407  
    408406        // cast initial samples 
    409         CastPassSamples(mInitialSamples, strategies, initialSamples); 
     407        CastPassSamples(mInitialSamples, mStrategies, initialSamples); 
    410408 
    411409        cout << "finished in " << TimeDiff(startTime, GetTime()) * 1e-3 << " secs" << endl; 
     
    479477                // cast new samples 
    480478                numSamples += CastPassSamples(mSamplesPerPass,  
    481                                                                           strategies, 
     479                                                                          mStrategies, 
    482480                                                                          constructionSamples); 
    483481 
     
    521519        cout << "casting " << mPostProcessSamples << " post processing samples ... "; 
    522520         
    523         CastPassSamples(mPostProcessSamples, strategies, postProcessSamples); 
     521        CastPassSamples(mPostProcessSamples, mStrategies, postProcessSamples); 
    524522 
    525523        cout << "finished" << endl; 
     
    566564                if (0) 
    567565                { 
    568                         strategies.clear(); 
    569                         strategies.push_back(SamplingStrategy::VIEWCELL_BORDER_BASED_DISTRIBUTION); 
     566                        mStrategies.clear(); 
     567                        mStrategies.push_back(SamplingStrategy::VIEWCELL_BORDER_BASED_DISTRIBUTION); 
    570568                } 
    571569 
     
    575573                VssRayContainer visSamples; 
    576574                int numSamples = CastPassSamples(mVisualizationSamples, 
    577                                                                                  strategies,  
     575                                                                                 mStrategies,  
    578576                                                                                 visSamples); 
    579577 
     
    994992        } 
    995993 
    996         // mix of sampling strategies 
    997         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         else 
    1006         { 
    1007                 strategies.push_back(SamplingStrategy::VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
    1008                 strategies.push_back(SamplingStrategy::REVERSE_VIEWSPACE_BORDER_BASED_DISTRIBUTION); 
    1009         } 
    1010  
    1011994        cout << "finished" << endl; 
    1012995    cout << "Evaluating view cell partition ... " << endl; 
     
    10251008                Debug << "casting " << samplesPerPass << " samples ... "; 
    10261009 
    1027                 CastPassSamples(samplesPerPass, strategies, evaluationSamples); 
     1010                CastPassSamples(samplesPerPass, mStrategies, evaluationSamples); 
    10281011                 
    10291012                castSamples += samplesPerPass; 
     
    59945977        Debug << "view cell stats prefix: " << statsPrefix << endl; 
    59955978 
    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 ... "; 
    60125980                 
    60135981        // reset pvs and start over from zero 
     
    60305998                Debug << "casting " << samplesPerPass << " samples ... "; 
    60315999 
    6032                 CastPassSamples(samplesPerPass, strategies, evaluationSamples); 
     6000                CastPassSamples(samplesPerPass, mStrategies, evaluationSamples); 
    60336001                 
    60346002                castSamples += samplesPerPass; 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r1768 r1773  
    4343 
    4444  struct PvsFilterStatistics { 
    45         PvsFilterStatistics(): mAvgFilterRadius(0.0f), mLocalFilterCount(0), mGlobalFilterCount(0) {} 
     45        PvsFilterStatistics():  
     46  mAvgFilterRadius(0.0f), mLocalFilterCount(0), mGlobalFilterCount(0) {} 
    4647        float mAvgFilterRadius; 
    4748        int mLocalFilterCount; 
     
    613614        /** Sets exporter color. 
    614615        */ 
    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; 
    616619         
    617620        /** Creates meshes from the view cells. 
     
    669672        ViewCellsTree *mViewCellsTree; 
    670673         
     674        std::vector<int> mStrategies; 
     675 
    671676        /** if the values in the view cell leaves and the interiors are up to date 
    672677                this is meant for lazy storing of the pvs, where only a scalar indicating 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp

    r1772 r1773  
    21282128        //-- pvs rendering heuristics 
    21292129 
    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(); 
    21322132 
    21332133        // only render cost heuristics or combined with standard deviation 
Note: See TracChangeset for help on using the changeset viewer.