Extending Camera Handling
Welcome to Chapter 6! In Chapter 5, we added the functionality to save and load the application configuration. First, we explored data types, file formats, and which data to save to a file. Then, we implemented a parser class to write and read configuration files in the YAML file format. At the end of the chapter, all models and instances plus the global settings were stored in a YAML file by using the yaml-cpp
library, and all data could be read back into the application, enabling us to resume building the virtual world.
In this chapter, we will enhance the camera configuration. As the first two steps, we will extend the application to handle more than one camera and add multiple camera types. Then, we’ll implement camera types for a first-person and third-person view, following a selected instance like in real games. Next, we will add stationary cameras, allowing a surveillance-style view of the virtual scenery. As the last step, we will add...