Graphics Programs Reference
In-Depth Information
Another important feature of this coordinate system is that it is left handed , meaning
the point (0, 0, -1) in this coordinate system lies closer to the viewer than the
point (0, 0, 1) . Apart from NDCS , there are other coordinate systems in the ver-
tex rendering stages of the graphics pipeline; however, we are more concerned with
NDCS , because we can transform it to act like a real world. This is illustrated in the
following section.
3D-Transformation
As shown in Chapter 2 , 3D-Transformation is an essential functionality of 3D graph-
ic rendering APIs, which we use to change sizes, orientations, or positions of objects
by matrix operations. Now, I'll briefly explain each of the following transformations
and describe the order in which these are used in ES 2.0 applications.
Types of Transformations
3D-Transformation is of the following three types:
▪ Geometric/Modeling transformation
▪ Coordinate/Viewing transformation
▪ Perspective/Projection transformation
Using geometric transformation, we can transform an object to a new position (trans-
lation transformation), a new size (scaling transformation), or a new configuration
(rotation transformation). An important feature of this transformation is that it is ap-
plied only to the object and not the coordinate system in which it is placed.
Matrices for geometric transformations ( translate , rotate, and scale matrices) require
factors per-axis for the corresponding transformation. Therefore, to translate an ob-
ject along the x-axis ( Figure 3-18 ), say from (1, 0, 0) to (5, 0, 0) , we need
to update the translate matrix with the desired axis (x-axis) and the factor (four in
this case).
 
Search WWH ::




Custom Search