1GLMULTMATRIX(3G)                                              GLMULTMATRIX(3G)
2
3
4

NAME

6       glMultMatrixd,  glMultMatrixf  -  multiply  the current matrix with the
7       specified matrix
8
9

C SPECIFICATION

11       void glMultMatrixd( const GLdouble *m )
12       void glMultMatrixf( const GLfloat *m )
13
14

PARAMETERS

16       m  Points to 16 consecutive values that are used as the elements  of  a
17          4×4 column-major matrix.
18

DESCRIPTION

20       glMultMatrix multiplies the current matrix with the one specified using
21       m, and replaces the current matrix with the product.
22
23       The current matrix is  determined  by  the  current  matrix  mode  (see
24       glMatrixMode). It is either the projection matrix, modelview matrix, or
25       the texture matrix.
26

EXAMPLES

28       If the current matrix is C, and the coordinates to be transformed  are,
29       v=(v[0],v[1],v[2],v[3]).  Then the current transformation is C×v, or
30
31
32                            c[0] c[4] c[8]  c[12]   v[0]
33                           ⎛⎝c[1] c[5] c[9]  c[13]⎞⎠×⎛⎝v[1]⎞⎠
34                            c[2] c[6] c[10] c[14]   v[2]
35                            c[3] c[7] c[11] c[15]   v[3]
36
37       Calling glMultMatrix with an argument of m=m[0],m[1],...,m[15] replaces
38       the current transformation with (C×Mv, or
39
40
41                c[0] c[4] c[8]  c[12]   m[0] m[4] m[8]  m[12]   v[0]
42               ⎛⎝c[1] c[5] c[9]  c[13]⎞⎠×⎛⎝m[1] m[5] m[9]  m[13]⎞⎠×⎛⎝v[1]⎞⎠
43                c[2] c[6] c[10] c[14]   m[2] m[6] m[10] m[14]   v[2]
44                c[3] c[7] c[11] c[15]   m[3] m[7] m[11] m[15]   v[3]
45
46       Where '×' denotes matrix multiplication, and v is represented as a  4×1
47       matrix.
48

NOTES

50       While the elements of the matrix may be specified with single or double
51       precision, the GL may store or operate on these  values  in  less  than
52       single precision.
53
54       In  many  computer  languages  4×4  arrays are represented in row-major
55       order. The transformations just described represent these  matrices  in
56       column-major  order.  The order of the multiplication is important. For
57       example, if the current transformation is a rotation, and  glMultMatrix
58       is  called  with a translation matrix, the translation is done directly
59       on the coordinates to be transformed, while the rotation is done on the
60       results of that translation.
61

ERRORS

63       GL_INVALID_OPERATION  is  generated if glMultMatrix is executed between
64       the execution of glBegin and the corresponding execution of glEnd.
65

ASSOCIATED GETS

67       glGet with argument GL_MATRIX_MODE
68       glGet with argument GL_COLOR_MATRIX
69       glGet with argument GL_MODELVIEW_MATRIX
70       glGet with argument GL_PROJECTION_MATRIX
71       glGet with argument GL_TEXTURE_MATRIX
72

SEE ALSO

74       glLoadIdentity(3G),         glLoadMatrix(3G),         glMatrixMode(3G),
75       glPushMatrix(3G)
76
77
78
79
80                                                              GLMULTMATRIX(3G)
Impressum