Game Development Reference
In-Depth Information
3d Object With Vertex
Coordinates In (x, y, z,w)
Format
Vertex
Local Object Coordinates
Vertex
Model Matrix
Transformation
Vertex Coordinate is
Translated, Rotated
and Scaled
World Coordinates
View Matrix
Transformation
Vertex Coordinate is
Adjusted With Respect To The
Camera's Position and Rotation
Eye Coordinates
Projection Matrix
Transformation
3D Vertex Coordinate is
Projected Onto a 2D Screen
Clipping Coordinates
Viewport
Transformation
Final 2D Image is Stretched
To Fit Into The Viewing
Window
Windows Coordinate
Figure 4-5. Vertex transformation procedure
Building the Model Matrix
The first thing that you need to build is the model matrix that puts the 3D object into the 3D world;
that is, transform the model from local object coordinates that originally define the object into world
coordinates. You do this by setting up translation, rotation, and scaling matrices and then multiplying
them with the original vertex in object coordinates. This translates the object to where you want to
put it in the world. It also rotates and scales the matrix if you so desire.
 
Search WWH ::




Custom Search