Ignore:
Timestamp:
03/31/06 10:37:45 (18 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
4 edited

Legend:

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

    r719 r720  
    468468         
    469469        // 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(); 
    476478        ViewCell::NewMail(); 
    477479 
     
    487489        // frequency stats are updated 
    488490        const int statsOut = 500; 
    489  
     491        Debug << "here3" << endl; Debug.flush(); 
    490492        // passes are needed for statistics, because we don't want to record 
    491493        // every merge 
     
    501503        int maxMergesPerPass; 
    502504        int numMergedViewCells = 0; 
    503  
     505        Debug << "here5" << endl; Debug.flush(); 
    504506        environment->GetIntValue("ViewCells.PostProcess.maxMergesPerPass", maxMergesPerPass); 
    505507        environment->GetFloatValue("ViewCells.PostProcess.avgCostMaxDeviation", avgCostMaxDeviation); 
     
    537539                        const int numMergedViewCells = UpdateActiveViewCells(activeViewCells); 
    538540                 
    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 
    542545                        if (mRefineViewCells) 
    543546                                RefineViewCells(rays, objects); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp

    r719 r720  
    309309        disposeRays(initialSamples, outRays); 
    310310         
    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); 
    316313 
    317314        // -- stats after contruction 
     
    359356                                                Preprocessor::SPATIAL_BOX_BASED_DISTRIBUTION;*/ 
    360357 
    361                 if (0) 
    362                         dirSamples = !dirSamples; // toggle sampling method 
     358                if (0) dirSamples = !dirSamples; // toggle sampling method 
    363359 
    364360                numSamples += CastPassSamples(mSamplesPerPass,  
     
    414410                ComputeSampleContributions(postProcessSamples, true, storeViewCells); 
    415411 
    416         // merge the view cells 
     412        //-- post processing (e.g.,merging) of the view cells 
    417413        PostProcess(preprocessor->mObjects, postProcessSamples); 
    418414 
    419         // only for testing 
     415        // only for debugging purpose 
    420416        if (TEST_EMPTY_VIEW_CELLS) 
    421417                CollectEmptyViewCells(); 
     
    444440    //SetValidity(0, 99999999999); 
    445441 
     442 
     443        // evaluation of the paritition, i.e., a number of new samples are cast 
    446444        if (mEvaluateViewCells) 
    447445        { 
     
    11361134void ViewCellsManager::UpdatePvs() 
    11371135{ 
    1138         if (mViewCellPvsIsUpdated) 
     1136        if (mViewCellPvsIsUpdated || !ViewCellsTreeConstructed()) 
    11391137                return; 
    11401138 
     
    12451243void ViewCellsManager::ResetViewCells() 
    12461244{ 
     1245        // recollect view cells 
    12471246        mViewCells.clear(); 
    1248          
    12491247        CollectViewCells(); 
    12501248         
     1249         
     1250        // stats are computed once more 
    12511251        mCurrentViewCellsStats.Reset(); 
    12521252        EvaluateViewCellsStats(); 
     
    33253325                maxPvs = mMaxPvsSize; 
    33263326        } 
     3327 
    33273328        Debug << "setting validity, min: " << minPvs << " max: " << maxPvs << endl; 
    33283329        cout << "setting validity, min: " << minPvs << " max: " << maxPvs << endl; 
     
    33313332 
    33323333        // 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 
    33373337        mTotalAreaValid = false; 
    33383338        VssRayContainer postProcessRays; 
     
    33453345        // and to correct the rendering statistics 
    33463346        if (0) FinalizeViewCells(false); 
    3347          
    3348          
     3347                 
    33493348        //-- merge the individual view cells 
    33503349        MergeViewCells(postProcessRays, objects); 
    33513350         
    3352         // only for testing 
     3351 
     3352        // only for debugging purpose: test if the subdivision is valid 
    33533353        TestSubdivision(); 
    33543354 
    33553355        //-- refines the merged view cells 
    3356         if (0) 
    3357                 RefineViewCells(postProcessRays, objects); 
     3356        if (0) RefineViewCells(postProcessRays, objects); 
    33583357 
    33593358         
    33603359        //-- render simulation after merge + refine 
    3361          
    33623360        cout << "\nevaluating bsp view cells render time before compress ... "; 
    33633361        dynamic_cast<RenderSimulator *>(mRenderer)->RenderScene(); 
     
    33723370 
    33733371        //-- compression 
    3374  
    33753372        if (ViewCellsTreeConstructed() && mCompressViewCells) 
    33763373        { 
  • GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.h

    r719 r720  
    279279        float GetRendercost(ViewCell *viewCell, float objRendercost) const; 
    280280 
    281         /** Returns container of loaded / generated view cells. 
     281        /** Returns reference to container of loaded / generated view cells. 
    282282        */ 
    283283        ViewCellContainer &GetViewCells(); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.h

    r710 r720  
    5757                /// the probability that this node contains view point 
    5858                float mProbability; 
    59                 /// geometry of node as induced by planes 
     59                /// geometry of node induced by half planes 
    6060                BspNodeGeometry *mGeometry; 
    6161                /// pvs size 
     
    6363                /// how often this branch has missed the max-cost ratio 
    6464                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) 
    6666                bool mIsKdNode; 
    67                 // hack for octree 
     67                /// current split axis: used for octree 
    6868                int mAxis; 
     69                /// for priority traversal: priority of this traversal data 
    6970                float mPriority; 
    7071 
Note: See TracChangeset for help on using the changeset viewer.