mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-21 18:47:17 +02:00
[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.
This commit is contained in:
parent
bdf9d74ec8
commit
85ebbba14f
4 changed files with 55 additions and 7 deletions
|
@ -23,6 +23,8 @@ Entity {
|
|||
property alias windowSize: trackball.windowSize
|
||||
property alias trackballSize: trackball.trackballSize
|
||||
|
||||
property bool loseMouseFocus: false // Must be changed by other entities when they want to take mouse focus
|
||||
|
||||
readonly property alias pressed: mouseHandler._pressed
|
||||
signal mousePressed(var mouse)
|
||||
signal mouseReleased(var mouse, var moved)
|
||||
|
@ -166,6 +168,8 @@ Entity {
|
|||
components: [
|
||||
FrameAction {
|
||||
onTriggered: {
|
||||
if(loseMouseFocus) return
|
||||
|
||||
if(panning) { // translate
|
||||
var d = (root.camera.viewCenter.minus(root.camera.position)).length() * 0.03;
|
||||
var tx = axisMX.value * root.translateSpeed * d;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue