Ignore:
Timestamp:
12/11/07 09:01:13 (17 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
2 added
2 edited

Legend:

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

    r2562 r2563  
    739739                                target.x, target.y, target.z, 
    740740                                up.x, up.y, up.z); 
    741                 } else { 
    742                         float dist = Magnitude(mSceneGraph->GetBox().Diagonal())*mTopDistance; 
     741                }  
     742                else  
     743                { 
     744                        float dist = Magnitude(mSceneGraph->GetBox().Diagonal()) * mTopDistance; 
    743745                        Vector3 pos = mViewPoint  + dist*Vector3(0, 
    744746                                1, 
     
    880882        connect(mControlWidget, SIGNAL(SetSceneCut(int)), this, SLOT(SetSceneCut(int))); 
    881883        connect(mControlWidget, SIGNAL(SetTopDistance(int)), this, SLOT(SetTopDistance(int))); 
     884        connect(mControlWidget, SIGNAL(SetTransparency(int)), this, SLOT(SetTransparency(int))); 
    882885 
    883886        connect(mControlWidget, SIGNAL(SetVisibilityFilterSize(int)), this, SLOT(SetVisibilityFilterSize(int))); 
     
    11461149{ 
    11471150        mHidingCost = (float)number / 1000.0f; 
    1148         cout << "hiding cost " << mHidingCost << endl; 
     1151        //cout << "hiding cost " << mHidingCost << endl; 
    11491152} 
    11501153 
     
    11541157{ 
    11551158        mTopDistance = number/1000.0f; 
     1159        updateGL(); 
     1160} 
     1161 
     1162void 
     1163QtGlRendererWidget::SetTransparency(int number) 
     1164{ 
     1165        mTransparency = number/1000.0f; 
    11561166        updateGL(); 
    11571167} 
     
    12001210                        maxPiercingRays = piercingRays; 
    12011211        } 
    1202  
    1203         cout << "here22 " << mHideByCost << " " << mHidingCost << endl; 
    12041212 
    12051213        if (!mShowPvsSizes && !mShowPiercingRays) 
     
    13411349        slider->setValue(200); 
    13421350 
    1343  
    13441351        connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetViewCellGranularity(int))); 
     1352 
     1353        /////////////////////////// 
    13451354 
    13461355        label = new QLabel("Transfer function"); 
     
    13571366        connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetTransferFunction(int))); 
    13581367 
    1359         { 
    1360                 QPushButton *button = new QPushButton("Update all PVSs", vbox); 
    1361                 vbox->layout()->addWidget(button); 
    1362                 connect(button, SIGNAL(clicked()), SLOT(UpdateAllPvs())); 
    1363         } 
    1364  
     1368        ////////////////////////////////////////7 
     1369 
     1370 
     1371        QPushButton *button = new QPushButton("Update all PVSs", vbox); 
     1372        vbox->layout()->addWidget(button); 
     1373        connect(button, SIGNAL(clicked()), SLOT(UpdateAllPvs())); 
     1374 
     1375 
     1376        ////////////////////////////////////////77777 
    13651377 
    13661378        label = new QLabel("Filter size"); 
     
    13771389 
    13781390 
     1391        ////////////////////////////////////////// 
     1392 
    13791393        label = new QLabel("Spatial Filter size"); 
    13801394        vbox->layout()->addWidget(label); 
     
    13901404 
    13911405 
     1406        /////////////////////////////////// 
     1407 
    13921408 
    13931409        QWidget *hbox = new QWidget(vbox); 
     
    14161432        connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowRays(bool))); 
    14171433 
    1418          
    14191434        cb = new QCheckBox("Show piercing rays", hbox); 
    14201435        hlayout->addWidget(cb); 
    14211436        cb->setChecked(false); 
    14221437        connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowPiercingRays(bool))); 
     1438 
     1439 
     1440        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*/ 
     1446        // Create a layout to organize the widgets. 
     1447/*      QVBoxLayout *qvboxlayout = new QVBoxLayout(qbuttongroup->layout()); 
     1448        qvboxlayout->setAlignment(Qt::AlignTop) 
     1449        qvboxlayout->setSpacing(6); 
     1450        qvboxlayout->setMargin(11); 
     1451*/ 
     1452        QRadioButton *rb; 
     1453 
     1454        // Create a check box to be in the group box 
     1455        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*/ 
     1464 
     1465        ////////////////////////////////// 
     1466 
     1467 
     1468        /*cb = new QRadiobox("Top View", vbox); 
     1469        vbox->layout()->addWidget(cb); 
     1470        cb->setChecked(false); 
     1471        connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetTopView(bool))); 
     1472*/ 
    14231473 
    14241474        vbox->resize(800,150); 
     
    14481498        connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetSceneCut(int))); 
    14491499 
     1500         
     1501        cb = new QCheckBox("Hide view cells by render cost ", vbox); 
     1502        vbox->layout()->addWidget(cb); 
     1503        cb->setChecked(false); 
     1504        connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetHideByCost(bool))); 
     1505 
     1506        //////////////////////////// 
     1507 
     1508        const int range = 1000; 
     1509 
     1510        label = new QLabel("Hide by cost"); 
     1511        vbox->layout()->addWidget(label); 
     1512 
     1513        // the render cost visualization 
     1514        slider = new QSlider(Qt::Horizontal, vbox); 
     1515        vbox->layout()->addWidget(slider); 
     1516        slider->show(); 
     1517        slider->setRange(0, range); 
     1518        slider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); 
     1519        slider->setValue(0); 
     1520        connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetHidingCost(int))); 
     1521 
     1522        /////////////////////////////////////////// 
     1523 
     1524        cb = new QCheckBox("Top View", vbox); 
     1525        vbox->layout()->addWidget(cb); 
     1526        cb->setChecked(false); 
     1527        connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetTopView(bool))); 
     1528 
     1529 
     1530        label = new QLabel("Top distance"); 
     1531        vbox->layout()->addWidget(label); 
     1532         
     1533        slider = new QSlider(Qt::Horizontal, vbox); 
     1534        vbox->layout()->addWidget(slider); 
     1535        slider->show(); 
     1536        slider->setRange(1, 1000); 
     1537        slider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); 
     1538        slider->setValue(500); 
     1539 
     1540        connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetTopDistance(int))); 
     1541         
     1542 
     1543        /////////////////////////////////////////// 
     1544 
     1545        cb = new QCheckBox("Transparency", vbox); 
     1546        vbox->layout()->addWidget(cb); 
     1547        cb->setChecked(false); 
     1548        connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetTransparency(bool))); 
     1549 
     1550        label = new QLabel("Use transparency"); 
     1551        vbox->layout()->addWidget(label); 
     1552 
     1553        // the render cost visualization 
     1554        slider = new QSlider(Qt::Horizontal, vbox); 
     1555        vbox->layout()->addWidget(slider); 
     1556        slider->show(); 
     1557        slider->setRange(0, range); 
     1558        slider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); 
     1559        slider->setValue(0); 
     1560 
     1561        connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetTransparency(int))); 
     1562 
     1563        ////////////////////////////// 
     1564 
    14501565 
    14511566        cb = new QCheckBox("Cut scene", vbox); 
     
    14931608 
    14941609 
    1495  
    1496  
    1497         slider = new QSlider(Qt::Horizontal, vbox); 
    1498         vbox->layout()->addWidget(slider); 
    1499         slider->show(); 
    1500         slider->setRange(1, 1000); 
    1501         slider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); 
    1502         slider->setValue(500); 
    1503  
    1504         connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetTopDistance(int))); 
    1505  
    1506         cb = new QCheckBox("Top View", vbox); 
    1507         vbox->layout()->addWidget(cb); 
    1508         cb->setChecked(false); 
    1509         connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetTopView(bool))); 
    1510  
    1511  
    1512  
    15131610        vbox = new QGroupBox("PVS Errors", this); 
    15141611        layout()->addWidget(vbox); 
     
    15171614        vbox->setLayout(vl); 
    15181615 
    1519         QPushButton *button = new QPushButton("Compute Visibility", vbox); 
     1616        button = new QPushButton("Compute Visibility", vbox); 
    15201617        vbox->layout()->addWidget(button); 
    15211618        connect(button, SIGNAL(clicked()), SLOT(ComputeVisibility())); 
     
    15451642                        SLOT(PvsErrorClicked(const QModelIndex &))); 
    15461643 
    1547                 QPushButton *button = new QPushButton("Next Error Frame", vbox); 
     1644                button = new QPushButton("Next Error Frame", vbox); 
    15481645                vbox->layout()->addWidget(button); 
    15491646                connect(button, SIGNAL(clicked(void)), SLOT(FocusNextPvsErrorFrame(void))); 
    15501647        } 
    15511648 
    1552         // the render cost visualization 
    1553         slider = new QSlider(Qt::Horizontal, vbox); 
    1554         vbox->layout()->addWidget(slider); 
    1555         slider->show(); 
    1556         slider->setRange(0, 1000); 
    1557         slider->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); 
    1558         slider->setValue(100); 
    1559         connect(slider, SIGNAL(valueChanged(int)), SIGNAL(SetHidingCost(int))); 
    15601649         
    1561         cb = new QCheckBox("Hide view cells by render cost ", vbox); 
    1562         vbox->layout()->addWidget(cb); 
    1563         cb->setChecked(false); 
    1564         connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetHideByCost(bool))); 
     1650        //mHidingCost = 0.1f; 
    15651651 
    15661652        setWindowTitle("Preprocessor Control Widget"); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h

    r2562 r2563  
    102102  void SetVisibilityFilterSize(int); 
    103103  void SetSpatialFilterSize(int); 
     104  void SetTransparency(int); 
    104105 
    105106  void SetShowRays(bool); 
     
    119120 
    120121  void SetHideByCost(bool); 
     122  void SetTransparency(bool); 
    121123}; 
    122124 
     
    152154        float mTopDistance; 
    153155 
     156        float mTransparency; 
     157 
    154158        // some statistics 
    155159        int mPvsSize; 
     
    284288 
    285289        void 
     290                SetTransparency(int dist); 
     291 
     292        void 
    286293                SetHidingCost(int dist); 
    287294 
     
    317324 
    318325        void SetCutViewCells(bool b) { 
    319                 std::cout << "here64" << std::endl; 
    320  
    321326                mCutViewCells = b; 
    322327                updateGL(); 
     
    328333 
    329334        void SetHideByCost(bool b) { 
    330                 std::cout << "here45" << std::endl; 
    331335                mHideByCost = b; 
    332336                updateGL(); 
Note: See TracChangeset for help on using the changeset viewer.