Changeset 2591 for GTP/trunk/Lib/Vis/Preprocessing/src
- Timestamp:
- 01/11/08 02:35:42 (17 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
r2588 r2591 205 205 206 206 207 void GlRenderer::RenderRays(const VssRayContainer &rays, int colorType )207 void GlRenderer::RenderRays(const VssRayContainer &rays, int colorType, int showDistribution) 208 208 { 209 209 VssRayContainer::const_iterator it = rays.begin(), it_end = rays.end(); … … 217 217 VssRay *ray = *it; 218 218 219 // only show distributions that were checked 220 if (((ray->mDistribution == SamplingStrategy::DIRECTION_BASED_DISTRIBUTION) && ((showDistribution & 1) == 0)) || 221 ((ray->mDistribution == SamplingStrategy::SPATIAL_BOX_BASED_DISTRIBUTION) && ((showDistribution & 2) == 0)) || 222 ((ray->mDistribution == SamplingStrategy::OBJECT_DIRECTION_BASED_DISTRIBUTION) && ((showDistribution & 4) == 0)) || 223 ((ray->mDistribution == SamplingStrategy::MUTATION_BASED_DISTRIBUTION) && ((showDistribution & 8) == 0))) 224 { 225 continue; 226 } 227 219 228 switch (colorType) 220 229 { -
GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h
r2587 r2591 129 129 130 130 void 131 RenderRays(const VssRayContainer &rays, int colorType = 0 );131 RenderRays(const VssRayContainer &rays, int colorType = 0, int showDistribution = 15); 132 132 133 133 void -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2587 r2591 717 717 if (1 && mShowRays) 718 718 { 719 RenderRays(mViewCellsManager->mVizBuffer.GetRays(), mRayVisualizationMethod );719 RenderRays(mViewCellsManager->mVizBuffer.GetRays(), mRayVisualizationMethod, mShowDistribution); 720 720 } 721 721 } … … 877 877 mShowDistanceWeightedTriangles = false; 878 878 mShowWeightedTriangles = false; 879 mShowDistribution = 15; 879 880 880 881 mSpatialFilterSize = 0.01; … … 931 932 connect(mControlWidget, SIGNAL(SetShowDistribution(bool)), this, SLOT(SetShowDistribution(bool))); 932 933 933 934 connect(mControlWidget, 935 SIGNAL(SetShowRays(bool)), 936 this, 937 SLOT(SetShowRays(bool))); 934 connect(mControlWidget, SIGNAL(SetShowDistribution1(bool)), this, SLOT(SetShowDistribution1(bool))); 935 connect(mControlWidget, SIGNAL(SetShowDistribution2(bool)), this, SLOT(SetShowDistribution2(bool))); 936 connect(mControlWidget, SIGNAL(SetShowDistribution3(bool)), this, SLOT(SetShowDistribution3(bool))); 937 connect(mControlWidget, SIGNAL(SetShowDistribution4(bool)), this, SLOT(SetShowDistribution4(bool))); 938 939 940 connect(mControlWidget, SIGNAL(SetShowRays(bool)), this, SLOT(SetShowRays(bool))); 938 941 939 942 resize(1000, 500); … … 1648 1651 connect(rb4, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution(bool))); 1649 1652 1653 1654 /////////////////////////// 1655 1656 1650 1657 QGroupBox *groupBox = new QGroupBox("Ray visualization options"); 1651 1658 QVBoxLayout *vbox2 = new QVBoxLayout; … … 1657 1664 1658 1665 rb1->setChecked(true); 1666 1667 1668 QCheckBox *cb = new QCheckBox("Distribution 1", parent); 1669 vbox2->addWidget(cb); 1670 cb->setChecked(true); 1671 connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution1(bool))); 1672 1673 cb = new QCheckBox("Distribution 2", parent); 1674 vbox2->addWidget(cb); 1675 cb->setChecked(true); 1676 connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution2(bool))); 1677 1678 cb = new QCheckBox("Distribution 3", parent); 1679 vbox2->addWidget(cb); 1680 cb->setChecked(true); 1681 connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution3(bool))); 1682 1683 cb = new QCheckBox("Distribution 4", parent); 1684 vbox2->addWidget(cb); 1685 cb->setChecked(true); 1686 connect(cb, SIGNAL(toggled(bool)), SIGNAL(SetShowDistribution4(bool))); 1687 1659 1688 1660 1689 vbox2->addStretch(1); -
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h
r2587 r2591 147 147 void SetShowContribution(bool); 148 148 void SetShowDistribution(bool); 149 150 void SetShowDistribution1(bool); 151 void SetShowDistribution2(bool); 152 void SetShowDistribution3(bool); 153 void SetShowDistribution4(bool); 149 154 }; 150 155 … … 191 196 bool mShowDistanceWeightedPvs; 192 197 bool mShowWeightedTriangles; 198 199 int mShowDistribution; 193 200 194 201 // some statistics … … 459 466 mRayVisualizationMethod = 3; 460 467 } 461 468 469 void SetShowDistribution1(bool b) 470 { 471 if (b) 472 mShowDistribution |= 1; 473 else 474 mShowDistribution ^= 1; 475 476 std::cout << "b: " << (mShowDistribution & 1) << " " << (mShowDistribution & 2) << " " << (mShowDistribution & 4) << " " << (mShowDistribution & 8) << std::endl; 477 } 478 479 480 void SetShowDistribution2(bool b) 481 { 482 if (b) 483 mShowDistribution |= 2; 484 else 485 mShowDistribution ^= 2; 486 } 487 488 489 void SetShowDistribution3(bool b) 490 { 491 if (b) 492 mShowDistribution |= 4; 493 else 494 mShowDistribution ^= 4; 495 } 496 497 void SetShowDistribution4(bool b) 498 { 499 if (b) 500 mShowDistribution |= 8; 501 else 502 mShowDistribution ^= 8; 503 } 462 504 463 505 void _RenderPvs();
Note: See TracChangeset
for help on using the changeset viewer.