O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – using OBJ files for the disks

Qt 3D doesn't provide a suitable mesh for the disks, but we can use a 3D modelling software to make any shape we want and then use it in our project. You will find the required OBJ files in the resources that come with the book. The files are named from disk0.obj to disk7.obj. If you want to practice with a 3D modelling software, you can prepare the files yourself.

Create a subdirectory named obj in your project directory and put the OBJ files there. Invoke the context menu of qml.qrc in the Qt Creator's project tree and select Add Existing Files. Add all OBJ files to the project. To put these files to work, we need to edit the Disk.qml file. Remove scale and rotation from the Transform component. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required