Plasma Engine  2.0
Loading...
Searching...
No Matches
ScaleGizmo.h
1#pragma once
2
3#include <EditorEngineProcessFramework/Gizmos/GizmoHandle.h>
4#include <EditorFramework/Gizmos/GizmoBase.h>
5#include <ToolsFoundation/ToolsFoundationDLL.h>
6
7class PL_EDITORFRAMEWORK_DLL plScaleGizmo : public plGizmo
8{
9 PL_ADD_DYNAMIC_REFLECTION(plScaleGizmo, plGizmo);
10
11public:
13
14 const plVec3& GetScalingResult() const { return m_vScalingResult; }
15
16 virtual void UpdateStatusBarText(plQtEngineDocumentWindow* pWindow) override;
17
18protected:
19 virtual void DoFocusLost(bool bCancel) override;
20
21 virtual plEditorInput DoMousePressEvent(QMouseEvent* e) override;
22 virtual plEditorInput DoMouseReleaseEvent(QMouseEvent* e) override;
23 virtual plEditorInput DoMouseMoveEvent(QMouseEvent* e) override;
24
25 virtual void OnSetOwner(plQtEngineDocumentWindow* pOwnerWindow, plQtEngineViewWidget* pOwnerView) override;
26 virtual void OnVisibleChanged(bool bVisible) override;
27 virtual void OnTransformationChanged(const plTransform& transform) override;
28
29protected:
30 plEngineGizmoHandle m_hAxisX;
31 plEngineGizmoHandle m_hAxisY;
32 plEngineGizmoHandle m_hAxisZ;
33 plEngineGizmoHandle m_hAxisXYZ;
34
35private:
36 plVec3 m_vScalingResult;
37 plVec3 m_vScaleMouseMove;
38
39 plVec2I32 m_vLastMousePos;
40
41 plTime m_LastInteraction;
42 plVec3 m_vMoveAxis;
43 plMat4 m_mInvViewProj;
44};
45
49class PL_EDITORFRAMEWORK_DLL plManipulatorScaleGizmo : public plScaleGizmo
50{
51 PL_ADD_DYNAMIC_REFLECTION(plManipulatorScaleGizmo, plScaleGizmo);
52
53public:
55
56protected:
57 virtual void OnTransformationChanged(const plTransform& transform) override;
58};
Definition GizmoHandle.h:90
Definition GizmoBase.h:25
Scale gizmo version that only uses boxes that can be composited with rotate and translate gizmos with...
Definition ScaleGizmo.h:50
Base class for all document windows that need a connection to the engine process, and might want to r...
Definition EngineDocumentWindow.moc.h:37
Base class for views that show engine output.
Definition EngineViewWidget.moc.h:34
Definition ScaleGizmo.h:8
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12