mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[ui] Viewer3D: new Trackball camera manipulator
This commit is contained in:
parent
6836f7fd93
commit
87d5a62846
6 changed files with 148 additions and 24 deletions
|
@ -100,26 +100,21 @@ FocusScope {
|
|||
}
|
||||
}
|
||||
|
||||
Entity {
|
||||
components: [
|
||||
SphereMesh {
|
||||
},
|
||||
Transform {
|
||||
id: viewCenterTransform
|
||||
translation: mainCamera.viewCenter
|
||||
scale: 0.005 * mainCamera.viewCenter.minus(mainCamera.position).length()
|
||||
},
|
||||
PhongMaterial {
|
||||
ambient: "#FFF"
|
||||
shininess: 0.2
|
||||
diffuse: activePalette.highlight
|
||||
specular: activePalette.highlight
|
||||
}
|
||||
]
|
||||
TrackballGizmo {
|
||||
beamRadius: 4.0/root.height
|
||||
alpha: cameraController.moving ? 1.0 : 0.7
|
||||
transform: Transform {
|
||||
translation: mainCamera.viewCenter
|
||||
scale: 0.15 * mainCamera.viewCenter.minus(mainCamera.position).length()
|
||||
}
|
||||
}
|
||||
|
||||
DefaultCameraController {
|
||||
id: cameraController
|
||||
windowSize: Qt.size(root.width, root.height)
|
||||
rotationSpeed: 10
|
||||
trackballSize: 0.4
|
||||
|
||||
camera: mainCamera
|
||||
focus: scene3D.activeFocus
|
||||
onMousePressed: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue