Changeset 1983 for GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
- Timestamp:
- 01/15/07 21:46:52 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r1967 r1983 338 338 ViewCell *viewcell = NULL; 339 339 340 PrVs prvs; 341 342 if (1 || !mUseFilter) { 343 viewcell = mViewCellsManager->GetViewCell(mViewPoint, true); 344 } else { 345 // mViewCellsManager->SetMaxFilterSize(1); 346 mViewCellsManager->GetPrVS(mViewPoint, prvs, mViewCellsManager->GetFilterWidth()); 347 viewcell = prvs.mViewCell; 348 } 340 if (mDetectEmptyViewSpace) 341 glEnable( GL_CULL_FACE ); 342 else 343 glDisable( GL_CULL_FACE ); 344 345 viewcell = mViewCellsManager->GetViewCell(mViewPoint, true); 349 346 350 347 if (viewcell) { … … 379 376 } 380 377 378 Intersectable::NewMail(); 379 381 380 // Render PVS 382 381 if (mUseSpatialFilter && mRenderBoxes) { 383 384 382 for (int i=0; i < mPvsCache.filteredBoxes.size(); i++) 383 RenderBox(mPvsCache.filteredBoxes[i]); 385 384 } else { 386 ObjectPvsIterator it = mPvsCache.mPvs.GetIterator(); 385 ObjectPvsIterator it = mPvsCache.mPvs.GetIterator(); 386 387 mPvsSize = mPvsCache.mPvs.GetSize(); 388 for (; it.HasMoreEntries(); ) { 389 ObjectPvsEntry entry = it.Next(); 390 Intersectable *object = entry.mObject; 387 391 388 mPvsSize = mPvsCache.mPvs.GetSize(); 389 for (; it.HasMoreEntries(); ) { 390 ObjectPvsEntry entry = it.Next(); 391 Intersectable *object = entry.mObject; 392 393 if (mRenderVisibilityEstimates) { 394 395 float visibility = mTransferFunction*log10(entry.mData.mSumPdf + 1); // /5.0f 396 glColor3f(visibility, 0.0f, 0.0f); 397 mUseForcedColors = true; 398 RenderIntersectable(object); 399 mUseForcedColors = false; 400 } else { 401 mUseForcedColors = false; 402 RenderIntersectable(object); 403 } 392 if (mRenderVisibilityEstimates) { 393 float visibility = mTransferFunction*log10(entry.mData.mSumPdf + 1); // /5.0f 394 glColor3f(visibility, 0.0f, 0.0f); 395 mUseForcedColors = true; 396 RenderIntersectable(object); 397 mUseForcedColors = false; 398 } else { 399 mUseForcedColors = false; 400 RenderIntersectable(object); 404 401 } 402 } 405 403 } 406 404 407 405 if (mRenderFilter) { 408 406 mWireFrame = true; … … 413 411 glPushAttrib(GL_CURRENT_BIT); 414 412 glColor3f(1.0f, 0.0f, 0.0f); 415 gluSphere((::GLUquadric *)mSphere,416 413 // gluSphere((::GLUquadric *)mSphere, 414 // 1e-3*Magnitude(mViewCellsManager->GetViewSpaceBox().Size()), 6, 6); 417 415 glPopAttrib(); 418 416 glPopMatrix(); 419 417 mWireFrame = false; 420 418 } 421 422 if (0 && mUseFilter)423 mViewCellsManager->DeleteLocalMergeTree(viewcell);424 425 419 } else { 426 427 428 420 ObjectContainer::const_iterator oi = mObjects.begin(); 421 for (; oi != mObjects.end(); oi++) 422 RenderIntersectable(*oi); 429 423 } 430 424 } … … 625 619 RenderPvs(); 626 620 } 627 628 621 } 629 622 … … 947 940 if (mViewCellsManager) 948 941 vc = mViewCellsManager->GetViewCells().size(); 942 949 943 int filter = 0; 950 944 if (mViewCellsManager) … … 985 979 if (mViewCellsManager) { 986 980 // mViewCellsManager->SetMaxFilterSize(number); 987 mViewCellsManager->CollectViewCells(number); 981 982 // $$ tmp off 983 mViewCellsManager->CollectViewCells(number); 988 984 989 985 // $$ does not work so far:( -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlViewer.cpp
r1972 r1983 54 54 55 55 mRenderer->RenderPvs(); 56 57 mRenderer->RenderViewPoint(); 58 56 59 57 60 // if (mRenderer->mShowRays) { -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlViewer.h
r1969 r1983 11 11 class QtGlViewer : public QGLWidget 12 12 { 13 //Q_OBJECT13 Q_OBJECT 14 14 15 15 friend class QtGlRendererWidget;
Note: See TracChangeset
for help on using the changeset viewer.