Flying maneuvers
Any object in 3D space can have transformations applied to it. It’s no different for the camera. In this section, we will explore how the same mathematics can be applied to the object to move and reorient it.
In Chapter 12, Mastering Affine Transformations, we discussed the three rotations that can take place in 3D space; namely, pitching, yawing, and rolling. These correspond with rotations around the x, y, and z axes respectively.
The 4 x 4 matrix that will perform a pitch around the x axis is:
The matrix that will perform a yaw around the y axis is:
The matrix to perform a roll around the z axis is:
We can use these matrices to rotate the camera and thus the view space. To do this, we multiply the view matrix by one or more of these.
The way the camera, or any other object transformed with these matrices, rotations can be likened to the movement of an aircraft as illustrated in Figure 15.1. In Figure 15.1 (a), the rotational...