diff options
author | Jere Tuliniemi <jere.tuliniemi@qt.io> | 2019-02-07 15:40:47 +0200 |
---|---|---|
committer | Jere Tuliniemi <jere.tuliniemi@qt.io> | 2019-02-13 09:16:07 +0000 |
commit | 0aa3c3a8cc47b4f2111085917cf61d90bafa332f (patch) | |
tree | 3204a86c966b41bb969d744c524534b1afc1656d /src/Authoring/Studio/Render/Q3DSTranslation.h | |
parent | fd944d35bbfe866a779a590bd56f520b15ece15b (diff) |
Port selection bounding boxes
Red bounding boxes are now drawn for selected objects. The model used
for the bounding box is a temporary one causing unnecessary lines to be
drawn. Bounding box calculation also can take time for models with large
amount of vertices so that should be done before model selection in the
future.
Q3DSSelectionWidget name is used for the new widget handling the
bounding boxes. The widget handling translation, scale and rotation is
renamed Q3DSManipulationWidget.
Task-number: QT3DS-3043
Change-Id: I243a22d5dc883c8719a66347173d54c75da267d5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Render/Q3DSTranslation.h')
-rw-r--r-- | src/Authoring/Studio/Render/Q3DSTranslation.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Authoring/Studio/Render/Q3DSTranslation.h b/src/Authoring/Studio/Render/Q3DSTranslation.h index 4c43109d..3109a4e4 100644 --- a/src/Authoring/Studio/Render/Q3DSTranslation.h +++ b/src/Authoring/Studio/Render/Q3DSTranslation.h @@ -52,6 +52,7 @@ #include "foundation/Qt3DSOption.h" #include "Q3DSEditCamera.h" #include "Q3DSSelectionWidget.h" +#include "Q3DSManipulationWidget.h" #include "Q3DSVisualAidWidget.h" #include "StudioEnums.h" @@ -88,6 +89,9 @@ private: void updateForegroundLayerProperties(); void updateSelectionWidgetProperties(); void createSelectionWidget(); + void enableManipulationWidget(); + void disableVisualAids(); + void enableVisualAids(); struct TranslatorGetDirty { @@ -210,8 +214,9 @@ private: long m_toolMode = STUDIO_TOOLMODE_MOVE; Q3DSGraphObject *m_pickedWidget = nullptr; QColor m_pickedWidgetColor; - Q3DSSelectionWidget m_selectionWidget; EditCameraTypes m_oldCameraType = EditCameraTypes::SceneCamera; + Q3DSManipulationWidget m_manipulationWidget; + Q3DSSelectionWidget m_selectionWidget; QVector<Q3DSVisualAidWidget> m_visualAids; quint64 m_visualAidIndex = 0; @@ -258,10 +263,8 @@ public: void enableForegroundLayer(); void disableGradient(); void enableGradient(); - void disableSelectionWidget(); - void enableSelectionWidget(qt3dsdm::Qt3DSDMInstanceHandle instance); - void disableVisualAids(); - void enableVisualAids(); + void selectObject(qt3dsdm::Qt3DSDMInstanceHandle instance); + void unselectObject(); void releaseTranslator(Q3DSGraphObjectTranslator *translator); void clearDirtySet(); void markDirty(qt3dsdm::Qt3DSDMInstanceHandle instance); |