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>
78 NOTIFY LoadingErrorChanged
87 public slots:
void OnHovered(
int _mouseX,
int _mouseY);
91 public slots:
void OnFocusWindow();
97 public slots:
void OnDropped(const
QString &_drop,
98 int _mouseX,
int _mouseY);
101 public: virtual
void LoadConfig(const
tinyxml2::XMLElement *_pluginElem)
106 public: Q_INVOKABLE
QString LoadingError() const;
110 public: Q_INVOKABLE
void SetLoadingError(const
QString &_loadingError);
113 signals:
void LoadingErrorChanged();
120 GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
139 public:
void Render(RenderSync *_renderSync,
179 private:
void HandleMouseEvent();
182 private:
void BroadcastHoverPos();
185 private:
void BroadcastDrag();
188 private:
void BroadcastLeftClick();
191 private:
void BroadcastRightClick();
194 private:
void BroadcastMousePress();
197 private:
void BroadcastScroll();
200 private:
void BroadcastKeyRelease();
203 private:
void BroadcastDrop();
206 private:
void BroadcastKeyPress();
218 public:
double cameraNearClip = 0.01;
221 public:
double cameraFarClip = 1000.0;
227 public: math::Color ambientLight = math::Color(0.3f, 0.3f, 0.3f, 1.0f);
230 public:
bool initialized =
false;
236 public:
bool textureDirty =
true;
239 public:
bool skyEnable =
false;
242 public: math::Angle cameraHFOV = math::Angle(M_PI * 0.5);
253 GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
425 private: QSGNode *updatePaintNode(QSGNode *_oldNode,
426 QQuickItem::UpdatePaintNodeData *_data)
override;
430 GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
445 RenderSync &_renderSync,
480 public: QQuickWindow *window =
nullptr;