The Camera Frustum

ypr

The camera frustum is defined by a truncated pyramid. At the top of the pyramid is the camera placed, aiming at the bottom of the pyramide. (see picture)
The pyramide is used by the rendering system, to define what should be rendered and what should not be rendered. All objects placed in the yellow volume, are rendered on screen. All other objects are invisible.





The Camera Frame

Using the camera frame you are able to position the camera in space and make it aim into the wanted direction.

cam_vecs

Mathematically a frame is a 4*4 matrix that holds information about: position and adjustment. The picture on the left is a visualisation of a camera frame.
A frame can also be thought of as a right handed coordinate system. The coordinate system also defines a position and the three perpendicular axis define the adjustment.

The position is defined by the origin of the coordinate system (placed in the camera).
The camera's adjustment (aiming) is accomplished by three colored vectors:
red axis ...... the right vector
green axis ...... the direction vector
blue axis ...... the up vector





Yaw Pitch Roll

ypr

Using three angles, you are also able to adjust a 3d object. The three angles are called: Yaw, Pitch and Roll. The three angles are comfortable in use, if doing a flight simulation or something similar. (Take a look at the picture on the right)
Changing the Yaw makes the 3d object look left and right. Setting the Pitch value makes it look up and down. Using the Roll angle, makes it rotate about its view axis.





The Viewport

cam_viewport

The viewport is the rectangual region in the window where the picture should be drawn. The parameters: posX and posY define the upper left position. Parameters: width and height define the extension of the viewport.
Note: The viewport mechanism can be used to create splitscreens. Have a look into the tutorial section to see how this can be done.





SourceForge.net Logo