Changeset 2577 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 01/07/08 02:50:59 (17 years ago)
- 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 1298 1298 1299 1299 1300 1301 void 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 1300 1319 void QtGlRendererWidget::RenderViewCells() 1301 1320 { … … 1322 1341 int i; 1323 1342 1343 mRecordHist = false; 1344 //mRecordHist = true; 1345 1324 1346 ViewCellContainer &viewcells = mViewCellsManager->GetViewCells(); 1325 1347 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 1326 1358 int maxPvs, maxPiercingRays; 1327 1359 float maxRelativeRays, maxRcCost; … … 1378 1410 } 1379 1411 1380 ViewCellInfoContainer *infos1 = mCurrentInfos[mCurrentSamples];1381 ViewCellInfoContainer *infos2 = mCompareInfos[mCurrentSamples];1382 1383 1412 if (mAssignImportanceByRelativeValue) 1384 1413 AssignImportanceByRelativeValue(viewcells, maxPvs, maxPiercingRays, maxRelativeRays, maxRcCost); 1385 1414 else 1415 { 1416 ViewCellInfoContainer *infos1 = mCurrentHist[mCurrentSamples]; 1417 ViewCellInfoContainer *infos2 = mCompareHist[mCurrentSamples]; 1386 1418 AssignColorByComparison(viewcells, *infos1, *infos2); 1419 } 1420 1387 1421 1388 1422 glEnable(GL_DEPTH_TEST); -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h
r2576 r2577 179 179 bool mShowWeightedTriangles; 180 180 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 181 187 // some statistics 182 188 int mPvsSize; … … 196 202 int mCurrentSamples; 197 203 198 ViewCellHistoryContainer mCurrent Infos;199 ViewCellHistoryContainer mCompare Infos;204 ViewCellHistoryContainer mCurrentHist; 205 ViewCellHistoryContainer mCompareHist; 200 206 201 207 … … 207 213 208 214 QtGlRendererWidget() {}; 215 216 void FillNewContainer(const ViewCellContainer &viewCells, ViewCellInfoContainer &infos); 217 209 218 210 219 void SetThread(QtPreprocessorThread *t) {
Note: See TracChangeset
for help on using the changeset viewer.