QtWS17 - Interacting with 3D content, Mike Krus, KDAB
Qt 3D 2.0 has greatly facilitated adding 3D content to modern 2D and 3D applications, providing a robust and versatile toolkit for displaying custom domain data using complex rendering techniques. One of the key aspect of successful visualisation is making it easy to interact with the data. In this talk, we will review the various methods available to the developer and how to implement them with Qt 3D.
We will start with simple picking, or the ability to query which object is currently under the mouse pointer. We will also see how to handle low level device events (mouse, keyboards, other controllers) to give behaviour to objects. When using the QML API, this is done in a truly declarative manner which is easy to apprehend and implement.
Integrating 2D and 3D UIs has traditionally been very cumbersome. But using Qt 3D’s QML API, Qt Quick can easily be used to create traditional 2D user interfaces to manipulate the properties of rendered objects and control the scene. Furthermore, Qt 3D 5.9 introduces, as a tech preview, the ability to embed such Qt Quick 2D UIs directly in the 3D scenes while preserving a seamless interactivity.
Moving and resizing objects in 3D while interacting on a 2D screen can be difficult. We will show how embedding special controls in the scene can be used to facilitate the editing of 3D objects, just like sliders and dials provide useful helpers in the 2D case. Referred to a manipulators, with limited and predictable degrees of freedom, such controls can be very helpful for facilitation such interactions.