Changeset 2564 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 12/11/07 13:25:44 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_arena
r2560 r2564 10 10 PREFIX=../work/plots/osp-TEST 11 11 12 12 #-rss_distributions=mutation+object_direction+spatial \ 13 13 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 14 -rss_distributions= mutation+object_direction+spatial\14 -rss_distributions=direction \ 15 15 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 16 16 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \ -
GTP/trunk/Lib/Vis/Preprocessing/scripts/run_demo_soda
r2534 r2564 11 11 PREFIX=../work/plots/osp-TEST 12 12 13 #-rss_distributions=mutation+object_direction+spatial \ 13 14 14 15 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \ 15 -rss_distributions= mutation+object_direction+spatial\16 -rss_distributions=direction \ 16 17 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ \ 17 18 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \ -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
r2562 r2564 1556 1556 glPushMatrix(); 1557 1557 glTranslatef(mViewPoint.x, mViewPoint.y, mViewPoint.z); 1558 glScalef(5.0f, 5.0f,5.0f);1558 glScalef(5.0f, 5.0f, 5.0f); 1559 1559 glPushAttrib(GL_CURRENT_BIT); 1560 1560 glColor3f(1.0f, 0.0f, 0.0f); -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2563 r2564 137 137 138 138 139 // 139 //glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE); 140 140 glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); 141 141 glEnable(GL_STENCIL_TEST); … … 545 545 mWireFrame = true; 546 546 RenderIntersectable(viewcell); 547 glPushMatrix(); 547 548 /*glPushMatrix(); 548 549 glTranslatef(mViewPoint.x, mViewPoint.y, mViewPoint.z); 549 550 glScalef(5.0f,5.0f,5.0f); … … 554 555 glPopAttrib(); 555 556 glPopMatrix(); 557 */ 556 558 mWireFrame = false; 557 559 } … … 841 843 842 844 mHideByCost = false; 845 mUseTransparency = false; 843 846 844 847 mTransferFunction = 0.2f; … … 890 893 connect(mControlWidget, SIGNAL(SetShowViewCells(bool)), this, SLOT(SetShowViewCells(bool))); 891 894 connect(mControlWidget, SIGNAL(SetShowRenderCost(bool)), this, SLOT(SetShowRenderCost(bool))); 895 connect(mControlWidget, SIGNAL(SetUseTransparency(bool)), this, SLOT(SetUseTransparency(bool))); 892 896 connect(mControlWidget, SIGNAL(SetShowPvsSizes(bool)), this, SLOT(SetShowPvsSizes(bool))); 893 897 connect(mControlWidget, SIGNAL(SetTopView(bool)), this, SLOT(SetTopView(bool))); … … 1172 1176 mUseFalseColors = true; 1173 1177 1174 glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT | GL_POLYGON_BIT);1178 //glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT | GL_POLYGON_BIT); 1175 1179 1176 1180 glEnable(GL_CULL_FACE); … … 1238 1242 //glFrontFace(GL_CCW); 1239 1243 //glCullFace(GL_BACK); 1240 glEnable(GL_DEPTH_TEST); 1241 glDisable(GL_BLEND); 1242 1243 //glDisable(GL_DEPTH_TEST); 1244 //glEnable(GL_BLEND); 1245 1246 //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1247 glBlendFunc(GL_SRC_ALPHA, GL_ONE); 1248 1249 for (i = 0; i < viewcells.size(); ++ i) 1244 if (!mUseTransparency) 1250 1245 { 1251 ViewCell *vc = viewcells[i]; 1252 const float dist = SqrDistance(mViewPoint, vc->GetBox().Center()); 1253 1254 vc->SetDistance(dist); 1246 glEnable(GL_DEPTH_TEST); 1247 glDisable(GL_BLEND); 1255 1248 } 1256 1257 sort(viewcells.begin(), viewcells.end(), nearerThan); 1249 else 1250 { 1251 //glCullFace(GL_BACK); 1252 //cout << "here29 " << mTransparency << endl; 1253 glDisable(GL_DEPTH_TEST); 1254 glEnable(GL_BLEND); 1255 1256 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 1257 //glBlendFunc(GL_SRC_ALPHA, GL_ONE); 1258 1259 for (i = 0; i < viewcells.size(); ++ i) 1260 { 1261 ViewCell *vc = viewcells[i]; 1262 const Vector3 dummyViewPoint(0.0, 0.0, 1.0); 1263 const float dist = SqrDistance(dummyViewPoint, vc->GetBox().Center()); 1264 1265 vc->SetDistance(dist); 1266 } 1267 1268 sort(viewcells.begin(), viewcells.end(), nearerThan); 1269 } 1258 1270 1259 1271 RgbColor c; … … 1282 1294 } 1283 1295 1284 const float alpha = 0.2f; 1285 glColor4f(c.r, c.g, c.b, alpha); 1296 glColor4f(c.r, c.g, c.b, 1.0f - mTransparency); 1286 1297 1287 1298 if (!mHideByCost || (mHidingCost < vc->GetNumPiercingRays() / (float)maxPiercingRays)) … … 1439 1450 1440 1451 QButtonGroup *qbuttongroup = new QButtonGroup(hbox);//, "RenderingGroupBox"); 1441 //qbuttongroup->setTitle(i18n("Rendering options "));1442 / *qbuttongroup->setColumnLayout(0, Qt::Vertical);1443 qbuttongroup->layout()->setSpacing(0);1444 qbuttongroup->layout()->setMargin(0);1445 */ 1452 //qbuttongroup->setTitle(i18n("Rendering options2")); 1453 //qbuttongroup->setColumnLayout(0, Qt::Horizontal); 1454 //qbuttongroup->layout()->setSpacing(0); 1455 //qbuttongroup->layout()->setMargin(0); 1456 1446 1457 // Create a layout to organize the widgets. 1447 /* QVBoxLayout *qvboxlayout = new QVBoxLayout(qbuttongroup->layout());1448 qvboxlayout->setAlignment(Qt::AlignTop) 1458 /*QVBoxLayout *qvboxlayout = new QVBoxLayout;//->layout()); 1459 qvboxlayout->setAlignment(Qt::AlignTop); 1449 1460 qvboxlayout->setSpacing(6); 1450 1461 qvboxlayout->setMargin(11); … … 1453 1464 1454 1465 // Create a check box to be in the group box 1466 1455 1467 rb = new QRadioButton("piercing rays", hbox); 1456 rb->setText("here71"); 1457 //qvboxlayout->addWidget(rb); 1458 1459 // Create another check box to the group box 1460 /* m_qradiobuttonStartFile = new QRadioButton("startFile", hbox); 1461 m_qradiobuttonStartFile->setText(i18n( "Start with last file used" ) ); 1462 qvboxlayout->addWidget(mRadiobuttonStartFile); 1463 */ 1468 rb->setText("piercing rays"); 1469 vl->addWidget(rb); 1470 1471 rb = new QRadioButton("render cost", hbox); 1472 rb->setText("render cost"); 1473 vl->addWidget(rb); 1464 1474 1465 1475 ////////////////////////////////// … … 1546 1556 vbox->layout()->addWidget(cb); 1547 1557 cb->setChecked(false); 1548 connect(cb, SIGNAL(toggled(bool)), SIGNAL(Set Transparency(bool)));1558 connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetUseTransparency(bool))); 1549 1559 1550 1560 label = new QLabel("Use transparency"); -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h
r2563 r2564 120 120 121 121 void SetHideByCost(bool); 122 void Set Transparency(bool);122 void SetUseTransparency(bool); 123 123 }; 124 124 … … 155 155 156 156 float mTransparency; 157 bool mUseTransparency; 157 158 158 159 // some statistics … … 334 335 void SetHideByCost(bool b) { 335 336 mHideByCost = b; 337 updateGL(); 338 } 339 340 void SetUseTransparency(bool b) { 341 mUseTransparency = b; 336 342 updateGL(); 337 343 } -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlViewer.cpp
r2562 r2564 53 53 ++ mRenderer->mFrame; 54 54 55 glDisable(GL_DEPTH_TEST);55 //glDisable(GL_DEPTH_TEST); 56 56 57 57 glColor3f(0.8f, 0.8f, 0.8f); 58 58 mRenderer->RenderPvs(); 59 60 mRenderer->RenderViewPoint();61 62 59 63 60 // if (mRenderer->mShowRays) { … … 77 74 if (mRenderer->mRenderViewCells) 78 75 mRenderer->RenderViewCells(); 76 77 mRenderer->RenderViewPoint(); 79 78 80 79 glColor3f(1.0f, 1.0f, 1.0f);
Note: See TracChangeset
for help on using the changeset viewer.