Game Development Reference
In-Depth Information
Figure 5.8. Projecting a 3D object onto a cardinal plane
5.3.1
Projecting onto a Cardinal Axis or Plane
The simplest type of projection occurs when we project onto a cardinal axis
(in 2D) or plane (in 3D). This is illustrated in Figure 5.8.
Projection onto a cardinal axis or plane most frequently occurs not
by actual transformation, but by simply discarding one of the coordinates
while assigning the data into a variable of lesser dimension. For example,
we may turn a 3D object into a 2D object by discarding the z components
of the points and copying only x and y.
However, we can also project onto a cardinal axis or plane by using a
scale value of zero on the perpendicular axis. For completeness, we present
the matrices for these transformations:
1
0
Projecting onto a
cardinal axis
P x = S
0
1
,0
=
,
0
0
0
0
P y = S
1
0
,0
=
,
0
1
 
Search WWH ::




Custom Search