Game Development Reference
In-Depth Information
Figure 7-4. Diagram of world coordinates transformed to camera view
Often, the model and view transforms are combined into one matrix.
Projection transform
Finally, the projection matrix transforms the camera view to the screen view. There are two ways of doing
this—with a perspective or with an orthogonal/parallel projection, as shown in Figure 7-5. Perspective is
the realistic way in 3D and what we will use in this chapter.
Figure 7-5. Diagram of camera coordinates transformed to screen view; left is perspective, right is orthogonal (parallel)
Viewport
The viewport sets the lower-left coordinate of the view and the width and height. Two sample viewports are
shown in Figure 7-6.
 
Search WWH ::




Custom Search