Gazebo Sim

API Reference

8.7.0
GlobalIlluminationCiVct.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef GZ_SIM_GUI_GLOBALILLUMINATIONCIVCT_HH_
19 #define GZ_SIM_GUI_GLOBALILLUMINATIONCIVCT_HH_
20 
21 #include <memory>
22 
23 #include "gz/sim/gui/GuiSystem.hh"
24 #include "gz/gui/qt.h"
25 
26 #include <QtQml/QQmlExtensionPlugin>
27 
28 namespace gz
29 {
30 namespace sim
31 {
32 // Inline bracket to help doxygen filtering.
33 inline namespace GZ_SIM_VERSION_NAMESPACE
34 {
35  class GlobalIlluminationCiVctPrivate;
36  class CiVctCascadePrivate;
37 
41  {
42  Q_OBJECT
43 
46  Q_PROPERTY(
47  bool enabled
48  READ Enabled
49  WRITE SetEnabled
50  NOTIFY EnabledChanged
51  )
52 
53  Q_PROPERTY(
54  bool cascadesEditable
55  READ CascadesEditable
57  )
58 
59  Q_PROPERTY(
60  int bounceCount
61  READ BounceCount
62  WRITE SetBounceCount
63  NOTIFY LightingChanged
64  )
65 
66  Q_PROPERTY(
67  bool highQuality
68  READ HighQuality
69  WRITE SetHighQuality
70  NOTIFY LightingChanged
71  )
72 
73  Q_PROPERTY(
74  bool anisotropic
75  READ Anisotropic
76  WRITE SetAnisotropic
77  NOTIFY LightingChanged
78  )
79 
80  Q_PROPERTY(
85  )
86 
87  Q_PROPERTY(
88  QStringList cameraList
89  READ CameraList
90  NOTIFY CameraListChanged
91  )
92 
93 
95 
97  public: ~GlobalIlluminationCiVct() override;
98 
99  // Documentation inherited
100  public: void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override;
101 
102  // Documentation Inherited
103  public: bool eventFilter(QObject *_obj, QEvent *_event) override;
104 
107 
110  public: Q_INVOKABLE void UpdateDebugVisualizationMode(int _mode);
111 
117  public: Q_INVOKABLE bool SetEnabled(const bool _enabled);
118 
121  public: Q_INVOKABLE bool Enabled() const;
122 
126  public: Q_INVOKABLE bool CascadesEditable() const;
127 
129  signals: void EnabledChanged();
130 
132  signals: void CascadesEditableChanged();
133 
135  signals: void SettingsChanged();
136 
138  signals: void LightingChanged();
139 
142 
144  signals: void CameraListChanged();
145 
147  signals: void qmlAddCascade();
148 
160  signals: void qmlAddCascade2(quint32 _resX, quint32 _resY, quint32 _resZ,
161  quint32 _octX, quint32 _octY, quint32 _octZ,
162  float _ahsX, float _ahsY, float _ahsZ,
163  float _thinWallCounter);
164 
167  public: Q_INVOKABLE void SetBounceCount(const uint32_t _bounces);
168 
171  public: Q_INVOKABLE uint32_t BounceCount() const;
172 
175  public: Q_INVOKABLE void SetHighQuality(const bool _quality);
176 
179  public: Q_INVOKABLE bool HighQuality() const;
180 
183  public: Q_INVOKABLE void SetAnisotropic(const bool _anisotropic);
184 
187  public: Q_INVOKABLE bool Anisotropic() const;
188 
192  public: Q_INVOKABLE void SetDebugVisualizationMode(const uint32_t _visMode);
193 
196  public: Q_INVOKABLE uint32_t DebugVisualizationMode() const;
197 
202  public: Q_INVOKABLE void OnCamareBind(const QString &_cameraName);
203 
205  private: void OnRefreshCamerasImpl();
206 
208  public: Q_INVOKABLE void OnRefreshCameras();
209 
211  public: Q_INVOKABLE QStringList CameraList();
212 
215  public: Q_INVOKABLE QObject* AddCascade();
216 
218  public: Q_INVOKABLE void PopCascade();
219 
224  public: Q_INVOKABLE QObject* GetCascade(int _idx) const;
225 
227  public: Q_INVOKABLE void ResetCascades();
228 
235  private: bool ValidSettings() const;
236 
239  private: std::unique_ptr<GlobalIlluminationCiVctPrivate> dataPtr;
240  };
241 }
242 }
243 }
244 #endif