Game Development Reference
In-Depth Information
discarded from further processing. The process of discarding such data
is called clipping .
The projection window is the 2D area that the 3D geometry inside
the frustum gets projected onto to create the 2D image representation
of the 3D scene. It is important to know that we define the projection
window with the dimensions min = (-1, -1) and max = (1, 1).
To simplify some of the drawings that are to follow in this topic, we
make the near plane and projection plane (plane the projection window
lies on) coincide. Also, note that Direct3D defines the projection plane
to be the plane z =1.
2.3 The Rendering Pipeline
Once we have described our 3D scene geometrically and set up a vir-
tual camera, we have the task of producing a 2D representation of that
scene on the monitor. The series of operations that must be performed
to achieve this is called the rendering pipeline. Figure 2.7 provides a
simplified overview of the pipeline, and the following subsections
explain each stage.
Figure 2.7: An abridged rendering pipeline
Several of the stages in the pipeline transform geometry from one
coordinate system to another. The transformations are done using
matrices. Direct3D is set up to do the transformation calculations for
us. This is advantageous because the transformations may be done on
the graphics hardware, if the hardware is capable of doing hardware
transformations. To use Direct3D for the transformations, all we must
do is supply the desired transformation matrix that describes the trans-
formation needed to go from one system to the next. We supply a
matrix using the IDirect3DDevice->SetTransform method. This
method takes a parameter describing the transformation type and a
matrix that represents the transformation. For example, from Figure
Team-Fly ®
Search WWH ::




Custom Search