Ignore:
Timestamp:
01/10/08 02:43:33 (16 years ago)
Author:
mattausch
Message:

worked on ray viz

Location:
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
Files:
2 edited

Legend:

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

    r2584 r2587  
    717717                if (1 && mShowRays)  
    718718                { 
    719                         RenderRays(mViewCellsManager->mVizBuffer.GetRays()); 
     719                        RenderRays(mViewCellsManager->mVizBuffer.GetRays(), mRayVisualizationMethod); 
    720720                } 
    721721        } 
     
    880880        mSpatialFilterSize = 0.01; 
    881881        mPvsSize = 0; 
     882        mRayVisualizationMethod = 0; 
    882883        mRenderError = 0.0f; 
    883884        mShowRays = false; 
     
    925926        connect(mControlWidget, SIGNAL(SetShowWeightedTriangles(bool)), this, SLOT(SetShowWeightedTriangles(bool))); 
    926927 
     928        connect(mControlWidget, SIGNAL(UseConstColorForRayViz(bool)), this, SLOT(UseConstColorForRayViz(bool))); 
     929        connect(mControlWidget, SIGNAL(UseRayLengthForRayViz(bool)), this, SLOT(UseRayLengthForRayViz(bool))); 
     930        connect(mControlWidget, SIGNAL(SetShowContribution(bool)), this, SLOT(SetShowContribution(bool))); 
     931        connect(mControlWidget, SIGNAL(SetShowDistribution(bool)), this, SLOT(SetShowDistribution(bool))); 
     932 
     933 
    927934        connect(mControlWidget, 
    928935                SIGNAL(SetShowRays(bool)), 
     
    15431550        QRadioButton *rb1, *rb2, *rb3, *rb4, *rb5; 
    15441551         
     1552        rb1 = new QRadioButton("wireframe", parent); 
     1553        rb1->setText("wireframe"); 
     1554        connect(rb1, SIGNAL(toggled(bool)), SIGNAL(SetShowWireFrame(bool))); 
     1555 
    15451556        // Create a check box to be in the group box 
    1546         rb1 = new QRadioButton("piercing rays", parent); 
    1547         rb1->setText("piercing rays"); 
     1557        rb2 = new QRadioButton("piercing rays", parent); 
     1558        rb2->setText("piercing rays"); 
    15481559        //vl->addWidget(rb1); 
    1549         connect(rb1, SIGNAL(toggled(bool)), SIGNAL(SetShowPiercingRays(bool))); 
    1550  
    1551         rb2 = new QRadioButton("pvs size", parent); 
    1552         rb2->setText("pvs size"); 
    1553         connect(rb2, SIGNAL(toggled(bool)), SIGNAL(SetShowPvsSizes(bool))); 
    1554  
    1555         rb3 = new QRadioButton("wireframe", parent); 
    1556         rb3->setText("wireframe"); 
     1560        connect(rb2, SIGNAL(toggled(bool)), SIGNAL(SetShowPiercingRays(bool))); 
     1561 
     1562        rb3 = new QRadioButton("pvs size", parent); 
     1563        rb3->setText("pvs size"); 
     1564        connect(rb3, SIGNAL(toggled(bool)), SIGNAL(SetShowPvsSizes(bool))); 
    15571565         
    15581566        rb4 = new QRadioButton("weighted rays", parent); 
     
    15651573 
    15661574        QGroupBox *groupBox = new QGroupBox("Visualization options"); 
    1567  
    1568         QVBoxLayout *vbox2 = new QVBoxLayout; 
    1569      
    1570         vbox2->addWidget(rb3); 
    1571         vbox2->addWidget(rb1); 
    1572         vbox2->addWidget(rb2); 
    1573         vbox2->addWidget(rb4); 
    1574         vbox2->addWidget(rb5); 
    1575          
    1576         rb3->setChecked(true); 
    1577  
    1578         vbox2->addStretch(1); 
    1579         groupBox->setLayout(vbox2); 
    1580  
    1581         return groupBox; 
    1582 } 
    1583  
    1584  
    1585  
    1586 QGroupBox *QtRendererControlWidget::CreateRenderCostPanel(QWidget *parent) 
    1587 { 
    1588         QRadioButton *rb1, *rb2, *rb3; 
    1589          
    1590         // Create a check box to be in the group box 
    1591         rb1 = new QRadioButton("triangles", parent); 
    1592         rb1->setText("triangles"); 
    1593         //vl->addWidget(rb1); 
    1594         connect(rb1, SIGNAL(toggled(bool)), SIGNAL(SetShowWeightedTriangles(bool))); 
    1595  
    1596         rb2 = new QRadioButton("distance weighted pvs", parent); 
    1597         rb2->setText("distance weighted"); 
    1598         connect(rb2, SIGNAL(toggled(bool)), SIGNAL(SetShowDistanceWeightedPvs(bool))); 
    1599  
    1600         rb3 = new QRadioButton("distance weighted triangles", parent); 
    1601         rb3->setText("distance weighted triangles"); 
    1602         connect(rb3, SIGNAL(toggled(bool)), SIGNAL(SetShowDistanceWeightedTriangles(bool))); 
    1603  
    1604         QGroupBox *groupBox = new QGroupBox("Render cost options"); 
    16051575 
    16061576        QVBoxLayout *vbox2 = new QVBoxLayout; 
     
    16091579        vbox2->addWidget(rb2); 
    16101580        vbox2->addWidget(rb3); 
    1611          
    1612         rb2->setChecked(true); 
     1581        vbox2->addWidget(rb4); 
     1582        vbox2->addWidget(rb5); 
     1583         
     1584        rb1->setChecked(true); 
     1585 
     1586        vbox2->addStretch(1); 
     1587        groupBox->setLayout(vbox2); 
     1588 
     1589        return groupBox; 
     1590} 
     1591 
     1592 
     1593 
     1594QGroupBox *QtRendererControlWidget::CreateRenderCostPanel(QWidget *parent) 
     1595{ 
     1596        QRadioButton *rb1, *rb2, *rb3; 
     1597         
     1598        // Create a check box to be in the group box 
     1599        rb1 = new QRadioButton("triangles", parent); 
     1600        rb1->setText("triangles"); 
     1601        connect(rb1, SIGNAL(toggled(bool)), SIGNAL(SetShowWeightedTriangles(bool))); 
     1602 
     1603        rb2 = new QRadioButton("distance weighted pvs", parent); 
     1604        rb2->setText("distance weighted"); 
     1605        connect(rb2, SIGNAL(toggled(bool)), SIGNAL(SetShowDistanceWeightedPvs(bool))); 
     1606 
     1607        rb3 = new QRadioButton("distance weighted triangles", parent); 
     1608        rb3->setText("distance weighted triangles"); 
     1609        connect(rb3, SIGNAL(toggled(bool)), SIGNAL(SetShowDistanceWeightedTriangles(bool))); 
     1610 
     1611        QGroupBox *groupBox = new QGroupBox("Render cost options"); 
     1612 
     1613        QVBoxLayout *vbox2 = new QVBoxLayout; 
     1614     
     1615        vbox2->addWidget(rb1); 
     1616        vbox2->addWidget(rb2); 
     1617        vbox2->addWidget(rb3); 
     1618         
     1619        rb1->setChecked(true); 
     1620 
     1621        vbox2->addStretch(1); 
     1622        groupBox->setLayout(vbox2); 
     1623 
     1624        return groupBox; 
     1625} 
     1626 
     1627 
     1628QGroupBox *QtRendererControlWidget::CreateRayVisualizationPanel(QWidget *parent) 
     1629{ 
     1630        QRadioButton *rb1, *rb2, *rb3, *rb4; 
     1631         
     1632        // Create a check box to be in the group box 
     1633        rb1 = new QRadioButton("const color", parent); 
     1634        rb1->setText("const color"); 
     1635        //vl->addWidget(rb1); 
     1636        connect(rb1, SIGNAL(toggled(bool)), SIGNAL(UseConstColorForRayViz(bool))); 
     1637 
     1638        rb2 = new QRadioButton("ray length", parent); 
     1639        rb2->setText("ray length"); 
     1640        connect(rb2, SIGNAL(toggled(bool)), SIGNAL(UseRayLengthForRayViz(bool))); 
     1641         
     1642        rb3 = new QRadioButton("contribution", parent); 
     1643        rb3->setText("contribution"); 
     1644        connect(rb3, SIGNAL(toggled(bool)), SIGNAL(SetShowContribution(bool))); 
     1645         
     1646        rb4 = new QRadioButton("distribution", parent); 
     1647        rb4->setText("distribution"); 
     1648        connect(rb4, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution(bool))); 
     1649 
     1650        QGroupBox *groupBox = new QGroupBox("Ray visualization options"); 
     1651        QVBoxLayout *vbox2 = new QVBoxLayout; 
     1652     
     1653        vbox2->addWidget(rb1); 
     1654        vbox2->addWidget(rb2); 
     1655        vbox2->addWidget(rb3); 
     1656        vbox2->addWidget(rb4); 
     1657         
     1658        rb1->setChecked(true); 
    16131659 
    16141660        vbox2->addStretch(1); 
     
    17401786        QGroupBox *groupBox2 = CreateRenderCostPanel(hbox); 
    17411787        vh->addWidget(groupBox2, 0, 0); 
     1788 
     1789         
     1790        QGroupBox *groupBox3 = CreateRayVisualizationPanel(hbox); 
     1791        vh->addWidget(groupBox3, 0, 0); 
    17421792 
    17431793        ////////////////////////////////// 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h

    r2584 r2587  
    9898   
    9999  QGroupBox *CreateRenderCostPanel(QWidget *parent); 
     100  QGroupBox *CreateRayVisualizationPanel(QWidget *parent); 
    100101 
    101102 
     
    141142  void SetShowWeightedTriangles(bool); 
    142143  void SetShowDistanceWeightedPvs(bool); 
     144 
     145  void UseConstColorForRayViz(bool); 
     146  void UseRayLengthForRayViz(bool); 
     147  void SetShowContribution(bool); 
     148  void SetShowDistribution(bool); 
    143149}; 
    144150 
     
    195201        Vector3 mDummyViewPoint; 
    196202 
     203        int mRayVisualizationMethod; 
     204 
    197205        QtRendererControlWidget *mControlWidget; 
    198206 
     
    430438                mShowWeightedTriangles = b; 
    431439                updateGL(); 
     440        } 
     441 
     442        void UseConstColorForRayViz(bool b) 
     443        { 
     444                mRayVisualizationMethod = 0; 
     445        } 
     446     
     447        void UseRayLengthForRayViz(bool b) 
     448        { 
     449                mRayVisualizationMethod = 1; 
     450        } 
     451 
     452        void SetShowContribution(bool b) 
     453        { 
     454                mRayVisualizationMethod = 2; 
     455        } 
     456     
     457        void SetShowDistribution(bool b) 
     458        { 
     459                mRayVisualizationMethod = 3; 
    432460        } 
    433461 
Note: See TracChangeset for help on using the changeset viewer.