Overview
In this post discusses camera and camera data that is used in projections and animations.
It holds transformation information such as pitch, yaw and roll angles, translation, scaleby as well as Model, View and Projection matrix information of the 3D object.
Details
Coordinate System
OpenGL uses Right hand side coordinate system where +Z is pointing towards you.
An 3D object can rotate along all the three axes as show below.
Rotation along X Axis is called Pitch. Rotation along Y Axis is called Yaw. Rotation along Z Axis is called Roll
Pitch(X Axis) Yaw (Y Axis) Roll (Z Axis)
For example, If key is pressed, its scan code is stored. similarly, if mouse left button is pressed and mouse is moved and then released, delta x and delta y are computed.
The derived camera classes from BaseCamera may use this information to further compute and store additional information in camera data structures.
For Example, SimpleCamera object implements keyboard and mouse handling as below:
Press X key => rotate around X axis by 10 degrees.
Press Y key => rotate around X axis by 10 degrees.
Press Z key => rotate around Z axis by 10 degrees.
Mouse Left Button Down. Mouse Move, Mouse Left Button Up => Compute Delta X, and Delta Y.
Later this is shared with 3D objects in the scene to draw.
Later this data is shared with all the 3D objects in the scene to redraw.
There different types of Camera Data to store different types of information. There are specialized camera classes to process data differently.

