Skip to content

Commit 0cf360b

Browse files
committed
Merge pull request #1120 from SCIInstitute/glyphs_unstructured_surfaces
Glyphs unstructured surfaces
2 parents 00ef619 + 16c2898 commit 0cf360b

File tree

10 files changed

+145
-57
lines changed

10 files changed

+145
-57
lines changed

src/Graphics/Glyphs/GlyphGeom.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,14 @@ void GlyphGeom::addEllipsoid(const Point& p, double radius1, double radius2, dou
222222

223223
void GlyphGeom::addCylinder(const Point p1, const Point& p2, double radius, double resolution,
224224
const ColorRGB& color1, const ColorRGB& color2)
225-
{
225+
{
226226
generateCylinder(p1, p2, radius, radius, resolution, color1, color2, numVBOElements_, points_, normals_, indices_, colors_);
227227
}
228228

229229
void GlyphGeom::addCone(const Point p1, const Point& p2, double radius, double resolution,
230230
const ColorRGB& color1, const ColorRGB& color2)
231231
{
232+
//std::cout << "p1: " << p1 << " p2 " << p2 << " radius: " << radius << " resolution: " << resolution << " color1: " << color1 << " color2: " << color2 << std::endl;
232233
generateCylinder(p1, p2, radius, 0.0, resolution, color1, color2, numVBOElements_, points_, normals_, indices_, colors_);
233234
}
234235

src/Interface/Modules/Fields/GenerateSinglePointProbeFromField.ui

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,18 +207,18 @@
207207
</widget>
208208
</item>
209209
<item row="0" column="2">
210-
<widget class="QSlider" name="probeSizeHorizontalSlider_">
211-
<property name="maximum">
212-
<number>100</number>
210+
<widget class="QDoubleSpinBox" name="sizeDoubleSpinBox_">
211+
<property name="decimals">
212+
<number>4</number>
213213
</property>
214-
<property name="orientation">
215-
<enum>Qt::Horizontal</enum>
214+
<property name="maximum">
215+
<double>100.000000000000000</double>
216216
</property>
217-
<property name="tickPosition">
218-
<enum>QSlider::TicksBelow</enum>
217+
<property name="singleStep">
218+
<double>0.100000000000000</double>
219219
</property>
220-
<property name="tickInterval">
221-
<number>10</number>
220+
<property name="value">
221+
<double>1.000000000000000</double>
222222
</property>
223223
</widget>
224224
</item>

src/Interface/Modules/Fields/GenerateSinglePointProbeFromFieldDialog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ GenerateSinglePointProbeFromFieldDialog::GenerateSinglePointProbeFromFieldDialog
4949
addDoubleSpinBoxManager(xLocationDoubleSpinBox_, Parameters::XLocation);
5050
addDoubleSpinBoxManager(yLocationDoubleSpinBox_, Parameters::YLocation);
5151
addDoubleSpinBoxManager(zLocationDoubleSpinBox_, Parameters::ZLocation);
52+
addDoubleSpinBoxManager(sizeDoubleSpinBox_, Parameters::ProbeSize);
5253
addLineEditManager(fieldValueLineEdit_, Parameters::FieldValue);
5354
addSpinBoxManager(fieldNodeSpinBox_, Parameters::FieldNode);
5455
addSpinBoxManager(fieldElemSpinBox_, Parameters::FieldElem);
55-
addSliderManager(probeSizeHorizontalSlider_, Parameters::ProbeSize);
5656

5757
connect(moveToComboBox_, SIGNAL(activated(const QString&)), this, SLOT(enableWidgets(const QString&)));
5858
connect(colorChooserPushButton_, SIGNAL(clicked()), this, SLOT(assignDefaultMeshColor()));

src/Interface/Modules/Render/ES/SRInterface.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ namespace SCIRun {
9696

9797
showOrientation_ = true;
9898
autoRotate_ = false;
99-
selectWidget_ = true;
99+
selectWidget_ = false;
100100
widgetSelected_ = false;
101101
widgetExists_ = false;
102102
mRenderSortType = RenderState::TransparencySortType::UPDATE_SORT;

src/Interface/Modules/Render/ViewScene.cc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,22 @@ void ViewSceneDialog::handleSelectedItem(const QString& name)
486486
newGeometryValue();
487487
}
488488

489+
//------------------------------------------------------------------------------
490+
void ViewSceneDialog::selectAllClicked()
491+
{
492+
itemValueChanged_ = true;
493+
unselectedObjectNames_.clear();
494+
newGeometryValue();
495+
}
496+
497+
//------------------------------------------------------------------------------
498+
void ViewSceneDialog::deselectAllClicked()
499+
{
500+
itemValueChanged_ = true;
501+
unselectedObjectNames_ = previousObjectNames_;
502+
newGeometryValue();
503+
}
504+
489505
//------------------------------------------------------------------------------
490506
bool ViewSceneDialog::isObjectUnselected(const std::string& name)
491507
{

src/Interface/Modules/Render/ViewScene.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ namespace SCIRun {
102102
void setTransparencySortTypeLists(bool index);
103103
void handleUnselectedItem(const QString& name);
104104
void handleSelectedItem(const QString& name);
105+
void selectAllClicked();
106+
void deselectAllClicked();
105107
void screenshotClicked();
106108
void saveNewGeometryChanged(int state);
107109
void sendGeometryFeedbackToState(int x, int y);

src/Interface/Modules/Render/ViewSceneControls.ui

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<widget class="QGroupBox" name="groupBox_7">
4949
<property name="geometry">
5050
<rect>
51-
<x>8</x>
51+
<x>10</x>
5252
<y>10</y>
5353
<width>261</width>
5454
<height>331</height>
@@ -69,9 +69,47 @@
6969
<x>5</x>
7070
<y>20</y>
7171
<width>251</width>
72-
<height>301</height>
72+
<height>261</height>
73+
</rect>
74+
</property>
75+
</widget>
76+
<widget class="QWidget" name="">
77+
<property name="geometry">
78+
<rect>
79+
<x>10</x>
80+
<y>293</y>
81+
<width>241</width>
82+
<height>25</height>
7383
</rect>
7484
</property>
85+
<layout class="QHBoxLayout" name="horizontalLayout">
86+
<item>
87+
<widget class="QPushButton" name="selectAllPushButton_">
88+
<property name="font">
89+
<font>
90+
<weight>50</weight>
91+
<bold>false</bold>
92+
</font>
93+
</property>
94+
<property name="text">
95+
<string>Select All</string>
96+
</property>
97+
</widget>
98+
</item>
99+
<item>
100+
<widget class="QPushButton" name="deselectAllPushButton_">
101+
<property name="font">
102+
<font>
103+
<weight>50</weight>
104+
<bold>false</bold>
105+
</font>
106+
</property>
107+
<property name="text">
108+
<string>Deselect All</string>
109+
</property>
110+
</widget>
111+
</item>
112+
</layout>
75113
</widget>
76114
</widget>
77115
</widget>

src/Interface/Modules/Render/ViewSceneControlsDock.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ ViewSceneControlsDock::ViewSceneControlsDock(const QString& name, ViewSceneDialo
6666
connect(contSortRadioButton_, SIGNAL(clicked(bool)), parent, SLOT(setTransparencySortTypeContinuous(bool)));
6767
connect(updateSortRadioButton_, SIGNAL(clicked(bool)), parent, SLOT(setTransparencySortTypeUpdate(bool)));
6868
connect(listSortRadioButton_, SIGNAL(clicked(bool)), parent, SLOT(setTransparencySortTypeLists(bool)));
69+
connect(selectAllPushButton_, SIGNAL(clicked()), parent, SLOT(selectAllClicked()));
70+
connect(deselectAllPushButton_, SIGNAL(clicked()), parent, SLOT(deselectAllClicked()));
71+
6972

7073
connect(objectListWidget_, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(slotChanged(QListWidgetItem*)));
7174
connect(this, SIGNAL(itemUnselected(const QString&)), parent, SLOT(handleUnselectedItem(const QString&)));

src/Modules/Legacy/Fields/GenerateSinglePointProbeFromField.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void GenerateSinglePointProbeFromField::setStateDefaults()
113113
state->setValue(FieldValue, std::string());
114114
state->setValue(FieldNode, 0);
115115
state->setValue(FieldElem, 0);
116-
state->setValue(ProbeSize, 50);
116+
state->setValue(ProbeSize, 1.0);
117117
state->setValue(ProbeLabel, std::string());
118118
state->setValue(ProbeColor, ColorRGB(1, 1, 1).toString());
119119
}

0 commit comments

Comments
 (0)