Game Development Reference
In-Depth Information
Figure 8-11. (a and b) The bike and grid models with their coordinates axis. (c) Drawing both models in the same
coordinate system. (d) Drawing with the coordinate base transformation.
The coordinate base transformation is a 4 × 4 matrix that we build using the data from the scene by following
a simple procedure.
Given the following input:
Point P : The point on the grid surface over which the bike should appear. This point may not
coincide with an actual vertex of the grid mesh, but it is usually a point on an edge between two
vertices.
Point Q = (Qx, Qy, Qz) : The position coordinates where the bike should be moved. This point is
closely related to P. Also called the “translation vector” since we “translate” (move) the model from
the axis origin (0,0,0) by this vector.
Vector N = (Nx, Ny, Nz) : The normal of the surface at point P. This is the vector perpendicular to
the surface at point P, pointing to the outside of the shape.
 
Search WWH ::




Custom Search