Implementing a vector-based camera with FPS style input support
We will begin this chapter by designing a simple class to handle the camera. In a typical OpenGL application, the viewing operations are carried out to place a virtual object on screen. We leave the details of the transformations required in between to a typical graduate text on computer graphics like the one given in the See also section of this recipe. This recipe will focus on designing a simple and efficient camera class. We create a simple inheritance from a base class called
CAbstractCamera. We will inherit two classes from this parent class,
CTargetCamera, as shown in the following figure:
The code for this recipe is in the
Chapter2/src directory. ...