Changeset 2565 for GTP/trunk/Lib/Vis/Preprocessing
- Timestamp:
- 12/11/07 14:26:03 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2564 r2565 1275 1275 ViewCell *vc = viewcells[i]; 1276 1276 1277 //cout << "dist: " << vc->GetDistance() << " ";1277 float importance; 1278 1278 1279 1279 if (mShowPiercingRays) 1280 1280 { 1281 // const floatimportance = 5.0f*mTransferFunction * ((float)vc->GetPvs().CountObjectsInPvs() / (float)maxPvs);1282 const float importance = 5.0f *mTransferFunction *1281 // importance = 5.0f*mTransferFunction * ((float)vc->GetPvs().CountObjectsInPvs() / (float)maxPvs); 1282 importance = mTransferFunction * 1283 1283 ((float)vc->GetNumPiercingRays() / (float)maxPiercingRays); 1284 // c = RgbColor(importance, 1.0f - importance, 0.0f);1285 c = RainbowColorMapping(importance);1286 1284 } 1287 1285 else 1288 1286 { 1289 // const floatimportance = 5.0f*mTransferFunction * ((float)vc->GetPvs().CountObjectsInPvs() / (float)maxPvs);1290 const float importance = 5.0f *mTransferFunction *1287 //importance = 5.0f*mTransferFunction * ((float)vc->GetPvs().CountObjectsInPvs() / (float)maxPvs); 1288 importance = mTransferFunction * 1291 1289 ((float)vc->GetPvs().GetSize() / (float)maxPvs); 1292 1290 // c = RgbColor(importance, 1.0f - importance, 0.0f); 1293 c = RainbowColorMapping( importance);1291 c = RainbowColorMapping(5.0f * importance); 1294 1292 } 1295 1293 1294 // c = RgbColor(importance, 1.0f - importance, 0.0f); 1295 c = RainbowColorMapping(5.0f * importance); 1296 1296 1297 glColor4f(c.r, c.g, c.b, 1.0f - mTransparency); 1297 1298 if (!mHideByCost || (mHidingCost < vc->GetNumPiercingRays() / (float)maxPiercingRays))1298 1299 if (!mHideByCost || (mHidingCost < importance)) 1299 1300 { 1300 1301 RenderViewCell(vc); 1301 1302 } 1302 1303 } … … 1433 1434 connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowRenderCost(bool))); 1434 1435 1435 cb = new QCheckBox("Show render cost", hbox);1436 /*cb = new QCheckBox("Show render cost", hbox); 1436 1437 hlayout->addWidget(cb); 1437 1438 cb->setChecked(false); 1438 1439 connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowPvsSizes(bool))); 1440 */ 1439 1441 1440 1442 cb = new QCheckBox("Show rays", hbox); … … 1443 1445 connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowRays(bool))); 1444 1446 1445 cb = new QCheckBox("Show piercing rays", hbox);1447 /*cb = new QCheckBox("Show piercing rays", hbox); 1446 1448 hlayout->addWidget(cb); 1447 1449 cb->setChecked(false); 1448 1450 connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowPiercingRays(bool))); 1449 1450 1451 QButtonGroup *qbuttongroup = new QButtonGroup(hbox);//, "RenderingGroupBox"); 1452 //qbuttongroup->setTitle(i18n("Rendering options2")); 1453 //qbuttongroup->setColumnLayout(0, Qt::Horizontal); 1454 //qbuttongroup->layout()->setSpacing(0); 1455 //qbuttongroup->layout()->setMargin(0); 1456 1457 // Create a layout to organize the widgets. 1458 /*QVBoxLayout *qvboxlayout = new QVBoxLayout;//->layout()); 1459 qvboxlayout->setAlignment(Qt::AlignTop); 1460 qvboxlayout->setSpacing(6); 1461 qvboxlayout->setMargin(11); 1462 */ 1463 QRadioButton *rb; 1451 */ 1452 1453 1454 QRadioButton *rb1, *rb2, *rb3; 1464 1455 1465 1456 // Create a check box to be in the group box 1466 1457 1467 rb = new QRadioButton("piercing rays", hbox); 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); 1458 rb1 = new QRadioButton("piercing rays", hbox); 1459 rb1->setText("piercing rays"); 1460 //vl->addWidget(rb1); 1461 connect(rb1, SIGNAL(toggled(bool)), SIGNAL(SetShowPiercingRays(bool))); 1462 1463 rb2 = new QRadioButton("render cost", hbox); 1464 rb2->setText("render cost"); 1465 //vl->addWidget(rb2); 1466 connect(rb2, SIGNAL(toggled(bool)), SIGNAL(SetShowPvsSizes(bool))); 1467 1468 rb3 = new QRadioButton("wireframe", hbox); 1469 rb3->setText("wireframe"); 1470 //vl->addWidget(rb2); 1471 //connect(rb2, SIGNAL(toggled(bool)), SIGNAL(SetShowPvsSizes(bool))); 1472 1473 QGroupBox *groupBox = new QGroupBox("Visualization options"); 1474 1475 QVBoxLayout *vbox2 = new QVBoxLayout; 1476 1477 vbox2->addWidget(rb3); 1478 vbox2->addWidget(rb1); 1479 vbox2->addWidget(rb2); 1480 rb2->setChecked(true); 1481 1482 vbox2->addStretch(1); 1483 groupBox->setLayout(vbox2); 1484 1485 vl->addWidget(groupBox, 0, 0); 1474 1486 1475 1487 //////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.