Game Development Reference
In-Depth Information
Figure 5.8. The view frustum encloses the space bounded by the near plane lying at a
distance n from the camera, the far plane lying at a distance f from the camera, and four
side planes that pass through the camera position C .
a rectangular window—the computer screen. The view frustum is bounded by six
planes, four of which correspond to the edges of the screen and are called the left ,
right , bottom , and top frustum planes. The remaining two planes are called the
near and far frustum planes, and define the minimum and maximum distances at
which objects in a scene are visible to the camera.
The view frustum is aligned to camera space . Camera space, also called eye
space , is the coordinate system in which the camera lies at the origin, the x axis
points to the right, and the y axis points upward. The direction in which the z axis
points depends on the 3D graphics library being used. Within the OpenGL li-
brary, the z axis points in the direction opposite that in which the camera points.
This forms a right-handed coordinate system and is shown in Figure 5.9. (Under
Direct3D, the z axis points in the same direction that the camera points and forms
a left-handed coordinate system.)
5.3.1 Field of View
The projection plane, shown in Figure 5.10, is a plane that is perpendicular to the
camera's viewing direction and lies at the distance e from the camera where the
left and right frustum planes intersect it at
. The distance e, which
is sometimes called the focal length of the camera, depends on the angle α
Search Nedrilad ::

Custom Search