Ignore:
Timestamp:
12/11/07 14:26:03 (17 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2564 r2565  
    12751275            ViewCell *vc = viewcells[i]; 
    12761276                         
    1277                         //cout << "dist: " << vc->GetDistance() << " "; 
     1277                        float importance; 
    12781278 
    12791279                        if (mShowPiercingRays) 
    12801280                        { 
    1281                                 // const float importance = 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 * 
    12831283                                        ((float)vc->GetNumPiercingRays() / (float)maxPiercingRays); 
    1284                                 // c = RgbColor(importance, 1.0f - importance, 0.0f); 
    1285                                 c = RainbowColorMapping(importance); 
    12861284                        } 
    12871285                        else 
    12881286                        { 
    1289                                 // const float importance = 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 * 
    12911289                                        ((float)vc->GetPvs().GetSize() / (float)maxPvs); 
    12921290                                // c = RgbColor(importance, 1.0f - importance, 0.0f); 
    1293                                 c = RainbowColorMapping(importance); 
     1291                                c = RainbowColorMapping(5.0f * importance); 
    12941292                        } 
    1295                          
     1293 
     1294                        // c = RgbColor(importance, 1.0f - importance, 0.0f); 
     1295                        c = RainbowColorMapping(5.0f * importance); 
     1296 
    12961297                        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))  
    12991300                        { 
    1300                 RenderViewCell(vc); 
     1301                                RenderViewCell(vc); 
    13011302                        } 
    13021303                } 
     
    14331434        connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowRenderCost(bool))); 
    14341435 
    1435         cb = new QCheckBox("Show render cost", hbox); 
     1436        /*cb = new QCheckBox("Show render cost", hbox); 
    14361437        hlayout->addWidget(cb); 
    14371438        cb->setChecked(false); 
    14381439        connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowPvsSizes(bool))); 
     1440        */ 
    14391441 
    14401442        cb = new QCheckBox("Show rays", hbox); 
     
    14431445        connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowRays(bool))); 
    14441446 
    1445         cb = new QCheckBox("Show piercing rays", hbox); 
     1447        /*cb = new QCheckBox("Show piercing rays", hbox); 
    14461448        hlayout->addWidget(cb); 
    14471449        cb->setChecked(false); 
    14481450        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; 
    14641455 
    14651456        // Create a check box to be in the group box 
    14661457         
    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); 
    14741486 
    14751487        ////////////////////////////////// 
Note: See TracChangeset for help on using the changeset viewer.