ViewerWidget.cpp
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarX::
17 * @author Mirko Waechter ( mirko.waechter at kit dot edu)
18 * @date 2012
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #include "ViewerWidget.h"
24 #include <ArmarXGui/applications/ArmarXGui/ui_ViewerWidget.h>
25 #include <ArmarXGui/applications/ArmarXGui/ui_ViewerWidgetConfigDialog.h>
26 
27 // Coin3D & SoQt
28 #include <Inventor/nodes/SoNode.h>
29 #include <Inventor/nodes/SoSeparator.h>
30 #include <Inventor/nodes/SoCamera.h>
31 #include <Inventor/actions/SoLineHighlightRenderAction.h>
32 #include <Inventor/actions/SoSearchAction.h>
33 
34 #include "../ArmarXMainWindow.h"
35 
36 #include <QGridLayout>
37 #include <QComboBox>
38 #include <QLabel>
39 #include <QToolBar>
40 #include <QCheckBox>
41 #include <QColorDialog>
42 #include <QPushButton>
43 #include <QDialogButtonBox>
44 #include <QShortcut>
45 #include <QDialog>
46 
47 namespace armarx
48 {
49 #define ARMARX_ORGANIZATION "KIT"
50 #define ARMARX_GUI_APPLICATION_NAME "ArmarXGUI"
51 
52 #define VIEWER_SETTINGS_AA "AntiAliasing"
53 #define VIEWER_SETTINGS_BACKGROUND_COLOR "BackgroundColor"
54 #define VIEWER_SETTINGS_TRANSPARENCY_TYPE "TransparencyType"
55 
56  Viewer3DWidget::Viewer3DWidget(QWidget* parent) :
57  ui(new Ui_Viewer3DWidget),
58  customToolbar(NULL),
59  settingsFile(armarx::ArmarXDataPath::GetDefaultUserConfigPath() + "/" + ARMARX_GUI_APPLICATION_NAME + ".conf"),
60  settings(QString(settingsFile.c_str()), QSettings::NativeFormat),
61  viewingModeAction(NULL)
62  {
63  configDialog = nullptr;
64  configDialogUi = nullptr;
65  }
66 
68  {
69  ARMARX_INFO << "~Viewer3DWidget()";
70  viewer.reset();
71 
72  delete configDialogUi;
73  delete ui;
74  }
75 
77  {
78  if (!viewer)
79  {
80  return;
81  }
82 
83  auto l = viewer->getScopedLock();
84 
85  if (index < 0 || index >= cb3DViewers->count())
86  {
87  viewer->setSceneGraph(emptyNode);
88  }
89  else
90  {
91  QString sceneName = cb3DViewers->itemText(index);
92 
93  ARMARX_INFO << "Setting 3D scene: " << sceneName;
94 
95  SoNode* node = sceneMap[sceneName].node;
96  bool initializeView = find(selectedViews.begin(), selectedViews.end(), node) == selectedViews.end();
97  viewer->setSceneGraph(node);
98 
99  if (initializeView)
100  {
101  if (initialCameraPoses.find(sceneName) != initialCameraPoses.end())
102  {
103  CameraPose p = initialCameraPoses[sceneName];
104 
105  viewer->getCamera()->position.setValue(p.position[0], p.position[1], p.position[2]);
106  viewer->getCamera()->orientation.setValue(p.orientation[0], p.orientation[1], p.orientation[2], p.orientation[3]);
107  viewer->getCamera()->focalDistance.setValue(p.focalDistance);
108  }
109  else
110  {
111  viewer->viewAll();
112  }
113 
114  selectedViews.push_back(node);
115  }
116  }
117  }
118 
119  void Viewer3DWidget::loadSettings(QSettings* settings)
120  {
121  std::set<QString> sceneNames;
122  for (auto& key : settings->allKeys())
123  {
124  if (key.startsWith("camera."))
125  {
126  sceneNames.insert(key.split('.').at(1));
127  }
128  }
129 
130  for (auto& scene : sceneNames)
131  {
132  CameraPose p;
133 
134  p.position[0] = settings->value("camera." + scene + ".pos_x").toFloat();
135  p.position[1] = settings->value("camera." + scene + ".pos_y").toFloat();
136  p.position[2] = settings->value("camera." + scene + ".pos_z").toFloat();
137 
138  p.orientation[0] = settings->value("camera." + scene + ".ori_q1").toFloat();
139  p.orientation[1] = settings->value("camera." + scene + ".ori_q2").toFloat();
140  p.orientation[2] = settings->value("camera." + scene + ".ori_q3").toFloat();
141  p.orientation[3] = settings->value("camera." + scene + ".ori_q4").toFloat();
142 
143  p.focalDistance = settings->value("camera." + scene + ".focalDistance").toFloat();
144 
145  initialCameraPoses[scene] = p;
146  }
147 
148  // clear initialized views and reset node to apply loaded settings
149  if (viewer)
150  {
151  auto l = viewer->getScopedLock();
152 
153  selectedViews.clear();
154  setNode(cb3DViewers->currentIndex());
155  }
156  }
157 
158  void Viewer3DWidget::saveSettings(QSettings* settings)
159  {
160  for (auto& scene : sceneMap.toStdMap())
161  {
162  SoSearchAction a;
163  a.setType(SoCamera::getClassTypeId(), true);
164  a.setInterest(SoSearchAction::FIRST);
165  a.apply(scene.second.node);
166 
167  if (!a.getPath())
168  {
169  continue;
170  }
171 
172  SoCamera* cameraNode = (SoCamera*)a.getPath()->getTail();
173  QString sceneName = scene.first;
174 
175  settings->setValue("camera." + sceneName + ".pos_x", cameraNode->position.getValue().getValue()[0]);
176  settings->setValue("camera." + sceneName + ".pos_y", cameraNode->position.getValue().getValue()[1]);
177  settings->setValue("camera." + sceneName + ".pos_z", cameraNode->position.getValue().getValue()[2]);
178 
179  settings->setValue("camera." + sceneName + ".ori_q1", cameraNode->orientation.getValue().getValue()[0]);
180  settings->setValue("camera." + sceneName + ".ori_q2", cameraNode->orientation.getValue().getValue()[1]);
181  settings->setValue("camera." + sceneName + ".ori_q3", cameraNode->orientation.getValue().getValue()[2]);
182  settings->setValue("camera." + sceneName + ".ori_q4", cameraNode->orientation.getValue().getValue()[3]);
183 
184  settings->setValue("camera." + sceneName + ".focalDistance", cameraNode->focalDistance.getValue());
185  }
186  }
187 
188  void Viewer3DWidget::setMainWindow(QMainWindow* mainWindow)
189  {
191  ArmarXMainWindow* guiMainWindow = qobject_cast<ArmarXMainWindow*>(getMainWindow());
192  connect(guiMainWindow, SIGNAL(updateSceneList(QMap<QString, Viewer3DInfo>)), this, SLOT(sceneListUpdated(QMap<QString, Viewer3DInfo>)));
193  sceneListUpdated(guiMainWindow->viewer3DMap);
194  }
195 
197  {
198  ui->setupUi(getWidget());
199  getWidget()->setContentsMargins(1, 1, 1, 1);
200  getWidget()->setFocusPolicy(Qt::WheelFocus);
201 
202  QGridLayout* grid = new QGridLayout();
203  grid->setContentsMargins(0, 0, 0, 0);
204  getWidget()->setLayout(grid);
205  getWidget()->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
206 
207  QWidget* view1 = new QWidget(getWidget());
208  view1->setMinimumSize(100, 100);
209  view1->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
210 
211  viewer.reset(new CoinViewer(view1, "", TRUE, SoQtExaminerViewer::BUILD_POPUP));
212  if (mutex3D)
213  {
214  viewer->setMutex(mutex3D);
215  }
216 
217  // setup
218  viewer->setBackgroundColor(SbColor(1.0f, 1.0f, 1.0f));
219  viewer->setAccumulationBuffer(false);
220 
221  emptyNode = new SoSeparator();
222  emptyNode->ref();
223  viewer->setSceneGraph(emptyNode);
224 
225  viewer->setFeedbackVisibility(true);
226  viewer->setGLRenderAction(new SoLineHighlightRenderAction());
227  viewer->viewAll();
228 
229  // show everything
230  viewer->show();
231 
232  cb3DViewers = new QComboBox(getWidget());
233  label = new QLabel("Scene:");
234  sceneConfigDialogButton = new QPushButton(QIcon(":/icons/configure-3.png"), "", getWidget());
235  sceneConfigDialogButton->setToolTip("Configure Scene");
236  grid->addWidget(view1, 0, 0, 1, 3);
237  grid->addWidget(label, 1, 0);
238  grid->addWidget(cb3DViewers, 1, 1);
239  grid->addWidget(sceneConfigDialogButton, 1, 2);
240  grid->setColumnMinimumWidth(2, 20);
241  sceneConfigDialogButton->setEnabled(false);
242  connect(cb3DViewers, SIGNAL(activated(int)), this, SLOT(select3DView(int)));
243  connect(cb3DViewers, SIGNAL(currentIndexChanged(int)), this, SLOT(select3DView(int)));
244  connect(sceneConfigDialogButton, &QPushButton::pressed, this, [this]()
245  {
246  int index = cb3DViewers->currentIndex();
247  if (index >= 0 && index < cb3DViewers->count())
248  {
249  QString sceneName = cb3DViewers->itemText(index);
250  auto sceneConfigDialog = sceneMap[sceneName].sceneConfigDialog;
251 
252  if (sceneConfigDialog)
253  {
254  sceneConfigDialog->open();
255  }
256  }
257  });
258 
259  // Create config dialog
260  configDialog = new QDialog(ArmarXWidgetController::getMainWindow());
261  configDialogUi = new Ui_ViewerWidgetConfigDialog;
262  configDialogUi->setupUi(configDialog);
263 
264  connect(configDialogUi->buttonBox, SIGNAL(accepted()), this, SLOT(configDialogApplySettings()));
265  connect(configDialogUi->buttonBox->button(QDialogButtonBox::Save), SIGNAL(clicked()), this, SLOT(configDialogSaveSettings()));
266  connect(configDialogUi->pushButtonPickColor, SIGNAL(pressed()), this, SLOT(configDialogPickColor()));
267 
268 
270 
271 
272  ArmarXMainWindow* guiMainWindow = qobject_cast<ArmarXMainWindow*>(ArmarXWidgetController::getMainWindow());
273  if (guiMainWindow)
274  {
275  sceneListUpdated(guiMainWindow->viewer3DMap);
276  }
277  }
278 
280  {
281  this->mutex3D = mutex3D;
282  if (viewer)
283  {
284  viewer->setMutex(mutex3D);
285  }
286  }
287 
288  QPointer<QWidget> Viewer3DWidget::getCustomTitlebarWidget(QWidget* parent)
289  {
290  if (customToolbar)
291  {
292  if (parent != customToolbar->parent())
293  {
294  customToolbar->setParent(parent);
295  }
296 
297  return customToolbar;
298  }
299 
300  customToolbar = new QToolBar(parent);
301  customToolbar->setIconSize(QSize(16, 16));
302  customToolbar->addAction(QIcon(":/icons/configure-3.png"), "Configure", this, SLOT(configDialogOpen()));
303 
304  viewingModeAction = customToolbar->addAction(QIcon(":/icons/hand.svg"), "Viewing Mode (V)", this, SLOT(toggleViewingMode()));
305  viewingModeAction->setShortcut(QKeySequence(Qt::Key_V));
306  viewingModeAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
307  getWidget()->addAction(viewingModeAction);
308  viewingModeAction->setCheckable(true);
309  viewingModeAction->setChecked(true);
310 
311  QAction* viewAllAction = new QAction(QIcon(":icons/zoom-original-2.png"), "View All (A)", getWidget());
312  customToolbar->addAction(viewAllAction);
313  viewAllAction->setShortcut(QKeySequence(tr("A")));
314  viewAllAction->setShortcutContext(Qt::WidgetWithChildrenShortcut);
315  connect(viewAllAction, SIGNAL(triggered()), this, SLOT(viewAll()));
316  getWidget()->addAction(viewAllAction);
317 
318  return customToolbar;
319  }
320 
322  {
323  // ARMARX_INFO << "Selecting 3d viewer entry " << index;
324  if (index >= 0 && index < cb3DViewers->count())
325  {
326  QString sceneName = cb3DViewers->itemText(index);
327  auto sceneConfigDialog = sceneMap[sceneName].sceneConfigDialog;
328 
329  sceneConfigDialogButton->setEnabled(sceneConfigDialog != nullptr);
330  }
331  else
332  {
333  sceneConfigDialogButton->setEnabled(false);
334  }
335  setNode(index);
336  }
337 
338  void Viewer3DWidget::sceneListUpdated(QMap<QString, Viewer3DInfo> sceneMap)
339  {
340  if (!viewer)
341  {
342  return;
343  }
344 
345  auto l = viewer->getScopedLock();
346  // ARMARX_INFO << "scene map size: " << sceneMap.size();
347  this->sceneMap = sceneMap;
348  int oldIndex = cb3DViewers->currentIndex();
349 
350  if (oldIndex < 0)
351  {
352  oldIndex = 0;
353  }
354 
355  cb3DViewers->clear();
356  QMap<QString, Viewer3DInfo> ::iterator it = sceneMap.begin();
357  std::vector<SoNode*> newSelectedList;
358 
359  for (; it != sceneMap.end(); it++)
360  {
361  cb3DViewers->addItem(it.key());
362 
363  if (find(selectedViews.begin(), selectedViews.end(), it.value().node) != selectedViews.end())
364  {
365  newSelectedList.push_back(it.value().node);
366  }
367  }
368 
369  selectedViews = newSelectedList;
370 
371  if (oldIndex < cb3DViewers->count())
372  {
373  select3DView(oldIndex);
374  // cb3DViewers->setCurrentIndex(oldIndex);
375  }
376 
377  // ARMARX_INFO << "SceneList updated";
378  }
379 
381  {
382  if (!color.isValid())
383  {
384  color = QColorDialog::getColor();
385  }
386 
387  if (color.isValid())
388  {
389  QPalette p;
390  p.setColor(QPalette::Button, color);
391  configDialogUi->pushButtonPickColor->setPalette(p);
392  }
393  }
394 
396  {
397  viewer->setViewing(!viewer->isViewing());
398  viewingModeAction->setChecked(viewer->isViewing());
399 
400  ARMARX_INFO << "Viewing mode " << (viewer->isViewing() ? "enabled" : "disabled");
401  }
402 
404  {
405  if (viewer)
406  {
407  viewer->viewAll();
408  }
409  }
410 
412  {
413  SbColor c = viewer->getBackgroundColor();
414  configDialogPickColor(QColor(255 * c[0], 255 * c[1], 255 * c[2]));
415 
416  configDialog->show();
417  }
418 
420  {
421  int numPasses = 0;
422 
423  if (configDialogUi->checkBoxMultipass->isChecked())
424  {
425  numPasses = pow(2, (configDialogUi->comboBoxMultipass->currentIndex() + 1));
426  }
427  viewer->setAccumulationBuffer(false);
428  viewer->setAntialiasing((numPasses > 0), numPasses);
429  ARMARX_INFO << "Multipass Anti Aliasing: " << numPasses << "x";
430 
431  QColor color = configDialogUi->pushButtonPickColor->palette().color(QPalette::Button);
432  viewer->setBackgroundColor(SbColor(color.red() / 255.0, color.green() / 255.0, color.blue() / 255.0));
433  ARMARX_INFO << "Background Color: (" << color.red() << ", " << color.green() << ", " << color.blue() << ")";
434 
435  if (configDialogUi->checkBoxTransparency->isChecked())
436  {
437  switch (configDialogUi->comboBoxTransparencyType->currentIndex())
438  {
439  case 0:
440  viewer->setTransparencyType(SoGLRenderAction::BLEND);
441  break;
442 
443  case 1:
444  viewer->setTransparencyType(SoGLRenderAction::SORTED_OBJECT_BLEND);
445  break;
446 
447  case 2:
448  viewer->setTransparencyType(SoGLRenderAction::SORTED_LAYERS_BLEND);
449  break;
450 
451  default:
452  ARMARX_WARNING << "Unknown transparency type set";
453  break;
454  }
455  }
456  else
457  {
458  viewer->setAlphaChannel(false);
459  viewer->setTransparencyType(SoGLRenderAction::NONE);
460  ARMARX_INFO << "Transparency disabled";
461  }
462  }
463 
465  {
466  if (!configDialogUi->checkBoxTransparency->isChecked())
467  {
468  settings.setValue(VIEWER_SETTINGS_TRANSPARENCY_TYPE, -1);
469  }
470  else
471  {
472  settings.setValue(VIEWER_SETTINGS_TRANSPARENCY_TYPE, configDialogUi->comboBoxTransparencyType->currentIndex());
473  }
474 
475  if (!configDialogUi->checkBoxMultipass->isChecked())
476  {
477  settings.setValue(VIEWER_SETTINGS_AA, -1);
478  }
479  else
480  {
481  settings.setValue(VIEWER_SETTINGS_AA, configDialogUi->comboBoxMultipass->currentIndex());
482  }
483 
484  settings.setValue(VIEWER_SETTINGS_BACKGROUND_COLOR, configDialogUi->pushButtonPickColor->palette().color(QPalette::Button));
485  }
486 
488  {
489  int transparencyType = settings.value(VIEWER_SETTINGS_TRANSPARENCY_TYPE, 1).toInt();
490  configDialogUi->checkBoxTransparency->setChecked(transparencyType != -1);
491  configDialogUi->comboBoxTransparencyType->setCurrentIndex(transparencyType);
492 
493  int antiAliasing = settings.value(VIEWER_SETTINGS_AA, -1).toInt();
494  configDialogUi->checkBoxMultipass->setChecked(antiAliasing != -1);
495  configDialogUi->comboBoxMultipass->setCurrentIndex(antiAliasing);
496 
497  QColor backgroundColor = settings.value(VIEWER_SETTINGS_BACKGROUND_COLOR, QColor(255, 255, 255)).value<QColor>();
498  if (backgroundColor.isValid())
499  {
500  QPalette p;
501  p.setColor(QPalette::Button, backgroundColor);
502  configDialogUi->pushButtonPickColor->setPalette(p);
503  }
504 
506  }
507 
509  {
510  }
511 
513  {
514  }
515 
517  {
518  cb3DViewers->setVisible(false);
519  label->setVisible(false);
520  sceneConfigDialogButton->setVisible(false);
521  }
522 
524  {
525  cb3DViewers->setVisible(true);
526  label->setVisible(true);
527  sceneConfigDialogButton->setVisible(true);
528  }
529 }
armarx::ArmarXWidgetController::mutex3D
std::shared_ptr< std::recursive_mutex > mutex3D
Definition: ArmarXWidgetController.h:301
armarx::Viewer3DWidget::getCustomTitlebarWidget
QPointer< QWidget > getCustomTitlebarWidget(QWidget *parent=0) override
getTitleToolbar returns a pointer to the a toolbar widget of this controller.
Definition: ViewerWidget.cpp:288
armarx::Viewer3DWidget::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition: ViewerWidget.cpp:512
VIEWER_SETTINGS_AA
#define VIEWER_SETTINGS_AA
Definition: ViewerWidget.cpp:52
armarx::Viewer3DWidget::setNode
void setNode(int index)
Definition: ViewerWidget.cpp:76
armarx::CameraPose
Definition: ViewerWidget.h:43
armarx::Viewer3DWidget::viewer
CoinViewerPtr viewer
Definition: ViewerWidget.h:87
index
uint8_t index
Definition: EtherCATFrame.h:59
armarx::Viewer3DWidget::loadSettings
void loadSettings(QSettings *settings) override
Implement to load the settings that are part of the GUI configuration.
Definition: ViewerWidget.cpp:119
armarx::Viewer3DWidget::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition: ViewerWidget.cpp:508
armarx::CameraPose::position
float position[3]
Definition: ViewerWidget.h:45
armarx::ArmarXMainWindow
The ArmarXMainWindow class.
Definition: ArmarXMainWindow.h:80
armarx::Viewer3DWidget::onLockWidget
void onLockWidget() override
Definition: ViewerWidget.cpp:516
armarx::Viewer3DWidget::Viewer3DWidget
Viewer3DWidget(QWidget *parent=0)
Definition: ViewerWidget.cpp:56
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
VIEWER_SETTINGS_BACKGROUND_COLOR
#define VIEWER_SETTINGS_BACKGROUND_COLOR
Definition: ViewerWidget.cpp:53
armarx::ArmarXWidgetController::getMainWindow
virtual QMainWindow * getMainWindow()
Returns the ArmarX MainWindow.
Definition: ArmarXWidgetController.cpp:125
armarx::Viewer3DWidget::sceneConfigDialogButton
QPointer< QPushButton > sceneConfigDialogButton
Definition: ViewerWidget.h:90
armarx::Viewer3DWidget::configDialogSaveSettings
void configDialogSaveSettings()
Definition: ViewerWidget.cpp:464
armarx::Viewer3DWidget::configDialogOpen
void configDialogOpen()
Definition: ViewerWidget.cpp:411
armarx::Viewer3DWidget::configDialogApplySettings
void configDialogApplySettings()
Definition: ViewerWidget.cpp:419
armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
armarx::Viewer3DWidget::emptyNode
SoSeparator * emptyNode
Definition: ViewerWidget.h:88
armarx::ArmarXWidgetController::RecursiveMutexPtr
std::shared_ptr< RecursiveMutex > RecursiveMutexPtr
Definition: ArmarXWidgetController.h:256
ARMARX_GUI_APPLICATION_NAME
#define ARMARX_GUI_APPLICATION_NAME
Definition: ViewerWidget.cpp:50
armarx::CoinViewer
Definition: CoinViewer.h:38
armarx::ArmarXDataPath
Definition: ArmarXDataPath.h:57
armarx::Viewer3DWidget::saveSettings
void saveSettings(QSettings *settings) override
Implement to save the settings as part of the GUI configuration.
Definition: ViewerWidget.cpp:158
armarx::Viewer3DWidget::~Viewer3DWidget
~Viewer3DWidget() override
Definition: ViewerWidget.cpp:67
armarx::Viewer3DWidget::toggleViewingMode
void toggleViewingMode()
Definition: ViewerWidget.cpp:395
armarx::Viewer3DWidget::label
QPointer< QLabel > label
Definition: ViewerWidget.h:91
armarx::Viewer3DWidget::viewAll
void viewAll()
Definition: ViewerWidget.cpp:403
armarx::Viewer3DWidget::setMutex3D
void setMutex3D(RecursiveMutexPtr const &mutex3D) override
This mutex is used to protect 3d scene updates.
Definition: ViewerWidget.cpp:279
armarx::Viewer3DWidget::select3DView
void select3DView(int index)
Definition: ViewerWidget.cpp:321
ViewerWidget.h
armarx::CameraPose::orientation
float orientation[4]
Definition: ViewerWidget.h:46
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::Viewer3DWidget::setMainWindow
void setMainWindow(QMainWindow *mainWindow) override
Definition: ViewerWidget.cpp:188
armarx::aron::similarity::FloatSimilarity::NONE
@ NONE
Definition: FloatSimilarity.h:11
armarx::Viewer3DWidget::configDialogLoadSettings
void configDialogLoadSettings()
Definition: ViewerWidget.cpp:487
armarx::ArmarXWidgetController::getWidget
virtual QPointer< QWidget > getWidget()
getWidget returns a pointer to the a widget of this controller.
Definition: ArmarXWidgetController.cpp:54
getColor
Color getColor(float value, ColorMap::Value colormap=ColorMap::JET)
Get the color for a given number in [0..1] using a given colormap.
Definition: color.h:84
armarx::Viewer3DWidget::postDocking
void postDocking() override
postDocking is called after the widget has been docked into the main window.
Definition: ViewerWidget.cpp:196
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
armarx::Viewer3DWidget::cb3DViewers
QPointer< QComboBox > cb3DViewers
Definition: ViewerWidget.h:89
armarx::ArmarXWidgetController::setMainWindow
virtual void setMainWindow(QMainWindow *mainWindow)
Definition: ArmarXWidgetController.cpp:120
armarx::CameraPose::focalDistance
float focalDistance
Definition: ViewerWidget.h:47
armarx::Viewer3DWidget::configDialogPickColor
void configDialogPickColor(QColor color=QColor::Invalid)
Definition: ViewerWidget.cpp:380
armarx::Viewer3DWidget::onUnlockWidget
void onUnlockWidget() override
Definition: ViewerWidget.cpp:523
VIEWER_SETTINGS_TRANSPARENCY_TYPE
#define VIEWER_SETTINGS_TRANSPARENCY_TYPE
Definition: ViewerWidget.cpp:54
armarx::Viewer3DWidget::sceneListUpdated
void sceneListUpdated(QMap< QString, Viewer3DInfo > sceneMap)
Definition: ViewerWidget.cpp:338
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28