Changeset 2587 for GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
- Timestamp:
- 01/10/08 02:43:33 (17 years ago)
- 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 717 717 if (1 && mShowRays) 718 718 { 719 RenderRays(mViewCellsManager->mVizBuffer.GetRays() );719 RenderRays(mViewCellsManager->mVizBuffer.GetRays(), mRayVisualizationMethod); 720 720 } 721 721 } … … 880 880 mSpatialFilterSize = 0.01; 881 881 mPvsSize = 0; 882 mRayVisualizationMethod = 0; 882 883 mRenderError = 0.0f; 883 884 mShowRays = false; … … 925 926 connect(mControlWidget, SIGNAL(SetShowWeightedTriangles(bool)), this, SLOT(SetShowWeightedTriangles(bool))); 926 927 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 927 934 connect(mControlWidget, 928 935 SIGNAL(SetShowRays(bool)), … … 1543 1550 QRadioButton *rb1, *rb2, *rb3, *rb4, *rb5; 1544 1551 1552 rb1 = new QRadioButton("wireframe", parent); 1553 rb1->setText("wireframe"); 1554 connect(rb1, SIGNAL(toggled(bool)), SIGNAL(SetShowWireFrame(bool))); 1555 1545 1556 // Create a check box to be in the group box 1546 rb 1= new QRadioButton("piercing rays", parent);1547 rb 1->setText("piercing rays");1557 rb2 = new QRadioButton("piercing rays", parent); 1558 rb2->setText("piercing rays"); 1548 1559 //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))); 1557 1565 1558 1566 rb4 = new QRadioButton("weighted rays", parent); … … 1565 1573 1566 1574 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 box1591 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");1605 1575 1606 1576 QVBoxLayout *vbox2 = new QVBoxLayout; … … 1609 1579 vbox2->addWidget(rb2); 1610 1580 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 1594 QGroupBox *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 1628 QGroupBox *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); 1613 1659 1614 1660 vbox2->addStretch(1); … … 1740 1786 QGroupBox *groupBox2 = CreateRenderCostPanel(hbox); 1741 1787 vh->addWidget(groupBox2, 0, 0); 1788 1789 1790 QGroupBox *groupBox3 = CreateRayVisualizationPanel(hbox); 1791 vh->addWidget(groupBox3, 0, 0); 1742 1792 1743 1793 ////////////////////////////////// -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h
r2584 r2587 98 98 99 99 QGroupBox *CreateRenderCostPanel(QWidget *parent); 100 QGroupBox *CreateRayVisualizationPanel(QWidget *parent); 100 101 101 102 … … 141 142 void SetShowWeightedTriangles(bool); 142 143 void SetShowDistanceWeightedPvs(bool); 144 145 void UseConstColorForRayViz(bool); 146 void UseRayLengthForRayViz(bool); 147 void SetShowContribution(bool); 148 void SetShowDistribution(bool); 143 149 }; 144 150 … … 195 201 Vector3 mDummyViewPoint; 196 202 203 int mRayVisualizationMethod; 204 197 205 QtRendererControlWidget *mControlWidget; 198 206 … … 430 438 mShowWeightedTriangles = b; 431 439 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; 432 460 } 433 461
Note: See TracChangeset
for help on using the changeset viewer.