Gazebo Sim

API Reference

9.0.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
24#include "gz/gui/qt.h"
25
26#include <QtQml/QQmlExtensionPlugin>
27
28namespace gz
29{
30namespace sim
31{
32// Inline bracket to help doxygen filtering.
33inline 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(
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
91 )
92
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
108
111 public: Q_INVOKABLE void UpdateDebugVisualizationMode(int _mode);
112
118 public: Q_INVOKABLE bool SetEnabled(const bool _enabled);
119
122 public: Q_INVOKABLE bool Enabled() const;
123
127 public: Q_INVOKABLE bool CascadesEditable() const;
128
130 signals: void EnabledChanged();
131
133 signals: void CascadesEditableChanged();
134
136 signals: void SettingsChanged();
137
139 signals: void LightingChanged();
140
143
145 signals: void CameraListChanged();
146
148 signals: void qmlAddCascade();
149
161 signals: void qmlAddCascade2(quint32 _resX, quint32 _resY, quint32 _resZ,
162 quint32 _octX, quint32 _octY, quint32 _octZ,
163 float _ahsX, float _ahsY, float _ahsZ,
164 float _thinWallCounter);
165
168 public: Q_INVOKABLE void SetBounceCount(const uint32_t _bounces);
169
172 public: Q_INVOKABLE uint32_t BounceCount() const;
173
176 public: Q_INVOKABLE void SetHighQuality(const bool _quality);
177
180 public: Q_INVOKABLE bool HighQuality() const;
181
184 public: Q_INVOKABLE void SetAnisotropic(const bool _anisotropic);
185
188 public: Q_INVOKABLE bool Anisotropic() const;
189
193 public: Q_INVOKABLE void SetDebugVisualizationMode(const uint32_t _visMode);
194
197 public: Q_INVOKABLE uint32_t DebugVisualizationMode() const;
198
203 public: Q_INVOKABLE void OnCamareBind(const QString &_cameraName);
204
206 private: void OnRefreshCamerasImpl();
207
209 public: Q_INVOKABLE void OnRefreshCameras();
210
212 public: Q_INVOKABLE QStringList CameraList();
213
216 public: Q_INVOKABLE QObject* AddCascade();
217
219 public: Q_INVOKABLE void PopCascade();
220
225 public: Q_INVOKABLE QObject* GetCascade(int _idx) const;
226
228 public: Q_INVOKABLE void ResetCascades();
229
236 private: bool ValidSettings() const;
237
240 private: std::unique_ptr<GlobalIlluminationCiVctPrivate> dataPtr;
241 };
242}
243}
244}
245#endif