Ignore:
Timestamp:
01/07/08 02:50:59 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
Files:
2 edited

Legend:

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

    r2576 r2577  
    12981298 
    12991299 
     1300 
     1301void QtGlRendererWidget::FillNewContainer(const ViewCellContainer &viewCells, ViewCellInfoContainer &infos) 
     1302{ 
     1303        ViewCellContainer::const_iterator vit, vit_end = viewCells.end(); 
     1304 
     1305        for (vit = viewCells.begin(); vit != vit_end; ++ vit) 
     1306        { 
     1307        ViewCell *vc = *vit; 
     1308                ViewCellInfo info; 
     1309 
     1310                info.mPiercingRays = vc->GetNumPiercingRays(); 
     1311 
     1312                infos.push_back(info); 
     1313                //myfile << "vc: " << vc->GetPvs().GetSize() << " " << vc->GetNumPiercingRays(); 
     1314        } 
     1315} 
     1316 
     1317 
     1318 
    13001319void QtGlRendererWidget::RenderViewCells() 
    13011320{ 
     
    13221341        int i; 
    13231342 
     1343        mRecordHist = false; 
     1344        //mRecordHist = true; 
     1345 
    13241346        ViewCellContainer &viewcells = mViewCellsManager->GetViewCells(); 
    13251347         
     1348        if (mRecordHist && (mSamples > mNextSamples)) 
     1349        { 
     1350                mNextSamples += 2000000; 
     1351 
     1352                ViewCellInfoContainer *newContainer = new ViewCellInfoContainer(); 
     1353 
     1354                FillNewContainer(viewcells, *newContainer); 
     1355                mCurrentHist[mNextSamples] = newContainer; 
     1356        } 
     1357 
    13261358        int maxPvs, maxPiercingRays; 
    13271359        float maxRelativeRays, maxRcCost; 
     
    13781410                } 
    13791411 
    1380                 ViewCellInfoContainer *infos1 = mCurrentInfos[mCurrentSamples]; 
    1381                 ViewCellInfoContainer *infos2 = mCompareInfos[mCurrentSamples]; 
    1382  
    13831412                if (mAssignImportanceByRelativeValue) 
    13841413                        AssignImportanceByRelativeValue(viewcells, maxPvs, maxPiercingRays, maxRelativeRays, maxRcCost); 
    13851414                else 
     1415                { 
     1416                        ViewCellInfoContainer *infos1 = mCurrentHist[mCurrentSamples]; 
     1417                        ViewCellInfoContainer *infos2 = mCompareHist[mCurrentSamples]; 
    13861418                        AssignColorByComparison(viewcells, *infos1, *infos2); 
     1419                } 
     1420 
    13871421 
    13881422                glEnable(GL_DEPTH_TEST);         
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h

    r2576 r2577  
    179179        bool mShowWeightedTriangles; 
    180180 
     181        /// the current number of samples 
     182        int mSamples; 
     183        /// the next number of samples where we record the data 
     184        int mNextSamples; 
     185        bool mRecordHist; 
     186 
    181187        // some statistics 
    182188        int mPvsSize; 
     
    196202        int mCurrentSamples; 
    197203 
    198         ViewCellHistoryContainer mCurrentInfos; 
    199         ViewCellHistoryContainer mCompareInfos; 
     204        ViewCellHistoryContainer mCurrentHist; 
     205        ViewCellHistoryContainer mCompareHist; 
    200206 
    201207 
     
    207213 
    208214        QtGlRendererWidget() {}; 
     215 
     216        void FillNewContainer(const ViewCellContainer &viewCells, ViewCellInfoContainer &infos); 
     217 
    209218 
    210219        void SetThread(QtPreprocessorThread *t) { 
Note: See TracChangeset for help on using the changeset viewer.