Commit graph

15 commits

Author SHA1 Message Date
Julien-Haudegond
da765a5f98 [ui] Viewer3D: TransformGizmo - moving transform operations to Python
- Moving transform operations from QML to Python to get access to more Qt functionalities and to make a better separation of logic/display.
2020-08-13 14:24:44 +02:00
Julien-Haudegond
b234a766a9 [ui] Viewer3D: TransformGizmo - removing FrameAction
- Moving the mouse's dependent events inside the MouseHandler and removing the FrameAction.
- MouseHandler is only enabled when the gizmo is selected. There is no infinite loop waiting for an event.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
f9d57cadff [ui] Viewer3D: TransformGizmo - add reset transform option
- Right clicking on the gizmo allows to reset the specific transformation.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
85ebbba14f [ui] Viewer3D: TransformGizmo - drawing gizmo on top of the object
- Special entity acting as an object container: we can add the entities we want to control with a gizmo inside it.
- Drawing the gizmo always on top of the object to make sure to see it every time.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
bdf9d74ec8 [ui] Viewer3D: TransformGizmo - cleaning and renaming 2020-08-13 14:22:19 +02:00
Julien-Haudegond
d04eaaccfc [ui] Viewer3D: TransformGizmo - new mouse handling rotation
- Rotation is the result angle of the mouse rotation around the gizmo's center. It is quite user-friendly.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
414a865dff [ui] Viewer3D: TransformGizmo - clean parameter names 2020-08-13 14:22:19 +02:00
Julien-Haudegond
ad2f287b66 [ui] Viewer3D: TransformGizmo - clean mouse handling translation 2020-08-13 14:22:19 +02:00
Julien-Haudegond
cd630418e4 [ui] Viewer3D: TransformGizmo - new mouse handling scale
- Scale is computed using the distance between the gizmo's center and the mouse. The scale unit (where nothing changes) is defined by the distance between the gizmo's center and the picked position.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
fb3b541a7f [ui] Viewer3D: TransformGizmo - new mouse handling translation
- Translations are computed using the dot product between the mouse vector (picked position to current position) and the projected picked axis vector. Like this, the behaviour is a lot more natural and user-friendly.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
29c4be6210 [ui] Viewer3D: TransformGizmo - use one global FrameAction
- Use only one global FrameAction instead of having one per axis
2020-08-13 14:22:19 +02:00
Julien-Haudegond
6a9f229838 [ui] Viewer3D: TransformGizmo - individual color picking 2020-08-13 14:22:19 +02:00
Julien-Haudegond
45fae981ba [ui] Viewer3D: TransformGizmo - add picking and transformations
- For now, transformations do not take well in count the orientation of the mouse but gizmo is functional.
2020-08-13 14:22:19 +02:00
Julien-Haudegond
30004fe690 [ui] Viewer3D: TransformGizmo - add needed mathematics functions
- Add Quaternions functions
- Add Matrices computation functions
2020-08-13 14:22:19 +02:00
Julien-Haudegond
98936b97d5 [ui] Viewer3D: add a Transform Gizmo Component
- Visual entity is done
- Need to make it pickable and to apply changes
2020-08-13 14:22:19 +02:00