AGX Dynamics  2.35.0.1
ParticleRenderWidget.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXQT_QTPARTICLERENDERWIDGET_H
18 #define AGXQT_QTPARTICLERENDERWIDGET_H
19 
20 #include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
21 #include <QWidget>
22 #include <QProcess>
23 #include <agxQt/ui_ParticleRenderSettingsWidget.h>
24 #include <osgViewer/ViewerEventHandlers>
25 #include <osgViewer/Renderer>
26 #include <agx/PopDisableWarnings.h> // End of disabled warnings.
27 
28 #include <agxQt/export.h>
29 #include <agxQt/QtOSGUtils.h>
30 #include <agx/Referenced.h>
31 #include <agx/Bound.h>
32 #include <agxQt/ParticleFilters.h>
33 
34 #define DEFAULT_VIDEO_FPS 30
35 #define DEFAULT_CAPTURE_FPS 30
36 
37 #define QUALITY_INTERVAL 20
38 #define DEFAULT_QUALITY_TICK 17
39 
40 namespace agxQt
41 {
42  class QtAgxWrapper;
43 
44  class AGXQT_EXPORT ParticleRenderWidget : public QWidget
45  {
46  Q_OBJECT
47 
48  public:
49  explicit ParticleRenderWidget(QWidget *parent = 0);
51 
54 
56 
58 
59  agx::String getSelectedParticleFilterModeName() const { return m_activeParticleFilterMode.m_id; }
60 
61  protected:
63 
65 
66  signals:
69 
70  protected:
72  void synchLabels();
75 
76  protected slots:
79  void slotSliderChanged(int val);
80 
84 
90 
93  void slotLimitToAnalysisBoxCheckBox(bool enable);
94  void slotParticleRenderingCheckBox(bool enable);
97  void slotShowColorLegendCheckBox(bool enable);
98 
100  // Variables
102  private:
103  ParticleRenderFilterModeVector m_particleParticleFilterModes;
104  ParticleFilterMode m_activeParticleFilterMode;
105  Ui::ParticleRenderWidget* m_ui;
108  agx::Vector<QCheckBox*> m_checkBoxes;
109  ParticleColorMode m_activeColorMode;
110  ParticleColorModeVector m_colorModes;
111  };
112 }
113 
114 #endif // QT_VIDEOSETTINGS_WIDGET
#define AGXQT_EXPORT
void synchComboBox(const ParticleColorModeVector &modes)
void setActiveParticleFilterFromName(const agx::String &name)
void slotLimitToAnalysisBoxCheckBox(bool enable)
void slotImpactParticleParticleCheckBox(bool enable)
void synchComboBox(const ParticleRenderFilterModeVector &modes)
void slotParticleContactNetworkCheckBox(bool enable)
ParticleRenderWidget(QWidget *parent=0)
void slotParticleTrajectoriesCheckBox(bool enable)
void slotParticleRenderingCheckBox(bool enable)
void slotImpactGeometryParticleCheckBox(bool enable)
agx::String getSelectedParticleFilterModeName() const
void setActiveColorModeFromName(const agx::String &mode)
void slotSliderChanged(int val)
void slotParticleFilterModeChanged(int)
void slotFilterThresholdScalarEditFinished()
void setInitialData(agxQt::QtAgxWrapper *wrapper)
Set initial data to the inputs in the widget.
void slotShowColorLegendCheckBox(bool enable)
Class that wraps SimulationController with an interface that enables QT Gui signals to control the si...
Definition: QtAgxWrapper.h:73
Contains classes/utility functions for connecting AGX to QT with OSG.