Handling of transformation matrices. The transformation from model to screen coordinates is performed in several steps. The MODEL matrix changes the model coordinates to world coordinates, the VIEW matrix continues the transformation to normalized coordinates and the PROJECT matrix to standard coordinates. In the standard system the visible region is the cube . Finally a machine dependent transformation into screen coordinates will be performed.
The matrices will be multiplied to the left of the vectors, i.e. the precedence is (PROJECT * VIEW * MODEL) * vector. The MODEL matrix's duty is the generation of a scene containing primitive objects, the VIEW matrix concludes the viewer's position and orientation and the PROJECT matrix creates a suitable perspective.
The mode G_MODE_GET is useful to read the desired matrix specified by the type. The mode G_MODE_SET affects the data of the specified matrix. The modes G_MODE_PRE and G_MODE_POST are intended to multiply a new matrix from left (post) or right (pre) to an existing matrix. The matrices PVM and IVM can only be read. Here PVM is equal to (PROJECT * VIEW * MODEL) and IVM is equal to the inverse of (VIEW * MODEL) but only the upper 3 x 3 entries are taken into account. The transponent of IVM transforms the normal vectors.
Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.