In this section, you will learn about one of the core functionalities of OpenGL, namely how the OpenGL geometry transformation matrices control how your objects end up on the screen. You will also learn how to use user input for controlling a camera, just as it is done in games and virtual world simulations.
It is highly recommended that the reader has some basic knowledge about matrix and vector algebra, and how transformation matrices work, since that will not be explained in detail here. For some good resources you can go to the following links:
But as usual, examples will get you started quicker than theory, so
you can read the lessons first, and if there is something you do not
understand, go back to these links.
|
Lesson 8: The transformation matrices
This lesson is an introduction to the OpenGL geometry transformation matrices, which are used to control the "camera". This gives the theoretical background to how we go about to control the OpenGL view, so this lesson is quite heavy reading. An example program demonstrates how to move the camera around a target, and zoom in and out by changing the field of view (prepare to get dizzy!). lesson08.zip (HTML & program source) |