18 #ifndef GZ_GUI_PLUGINS_MINIMALSCENE_HH_
19 #define GZ_GUI_PLUGINS_MINIMALSCENE_HH_
24 #include <gz/common/KeyEvent.hh>
25 #include <gz/common/MouseEvent.hh>
26 #include <gz/math/Color.hh>
27 #include <gz/math/Pose3.hh>
28 #include <gz/math/Vector2.hh>
29 #include <gz/utils/ImplPtr.hh>
79 NOTIFY LoadingErrorChanged
88 public slots:
void OnHovered(
int _mouseX,
int _mouseY);
92 public slots:
void OnFocusWindow();
98 public slots:
void OnDropped(const
QString &_drop,
99 int _mouseX,
int _mouseY);
102 public: virtual
void LoadConfig(const
tinyxml2::XMLElement *_pluginElem)
107 public: Q_INVOKABLE
QString LoadingError() const;
111 public: Q_INVOKABLE
void SetLoadingError(const
QString &_loadingError);
114 signals:
void LoadingErrorChanged();
121 GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
140 public:
void Render(RenderSync *_renderSync,
180 private:
void HandleMouseEvent();
183 private:
void BroadcastHoverPos();
186 private:
void BroadcastDrag();
189 private:
void BroadcastLeftClick();
192 private:
void BroadcastRightClick();
195 private:
void BroadcastMousePress();
198 private:
void BroadcastScroll();
201 private:
void BroadcastKeyRelease();
204 private:
void BroadcastDrop();
207 private:
void BroadcastKeyPress();
219 public:
double cameraNearClip = 0.01;
222 public:
double cameraFarClip = 1000.0;
225 public:
unsigned int cameraAntiAliasing = 8;
231 public: math::Color ambientLight = math::Color(0.3f, 0.3f, 0.3f, 1.0f);
234 public:
bool initialized =
false;
240 public:
bool textureDirty =
true;
243 public:
bool skyEnable =
false;
246 public: math::Angle cameraHFOV = math::Angle(M_PI * 0.5);
257 GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
433 private: QSGNode *updatePaintNode(QSGNode *_oldNode,
434 QQuickItem::UpdatePaintNodeData *_data)
override;
438 GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
453 RenderSync &_renderSync,
488 public: QQuickWindow *window =
nullptr;