What just happened?

Our animation has a lot of properties because it should be flexible enough to handle all the cases we need. First, it should be able to animate any disk, so we added the target property that will contain the disk we currently move. Next, the rods that participate in the movement influence the intermediate and final coordinates of the disk (more specifically, its x and z coordinates). The rod1Pos and rod2Pos properties will hold the coordinates of the rods in play. The startY and finalY properties define the starting and final coordinates of the disk. These coordinates will depend on the current number of disks stored on each rod. Finally, the maxY property simply defines the maximum height the disk will raise at while ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.