1GLROTATE(3G)                                                      GLROTATE(3G)
2
3
4

NAME

6       glRotated, glRotatef - multiply the current matrix by a rotation matrix
7
8

C SPECIFICATION

10       void glRotated( GLdouble angle,
11                       GLdouble x,
12                       GLdouble y,
13                       GLdouble z )
14       void glRotatef( GLfloat angle,
15                       GLfloat x,
16                       GLfloat y,
17                       GLfloat z )
18
19

PARAMETERS

21       angle  Specifies the angle of rotation, in degrees.
22
23       x, y, z
24              Specify the x, y, and z coordinates of a vector, respectively.
25

DESCRIPTION

27       glRotate  produces  a  rotation  of  angle  degrees  around  the vector
28       (x,y,z).  The current matrix (see  glMatrixMode)  is  multiplied  by  a
29       rotation  matrix  with  the product replacing the current matrix, as if
30       glMultMatrix were called with the following matrix as its argument:
31
32                         x2(1−c)+c  xy(1−c)−zs xz(1−c)+ys 0
33                        ⎛⎝yx(1−c)+zs y2(1−c)+c  yz(1−c)−xs 0⎞⎠
34                         xz(1−c)−ys yz(1−c)+xs z2(1−c)+c  0
35                             0          0          0      1
36       Where c=cos(angle), s=sin(angle), and ||(x,y,z)||=1  (if  not,  the  GL
37       will normalize this vector).
38
39
40
41       If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all objects
42       drawn after glRotate is  called  are  rotated.   Use  glPushMatrix  and
43       glPopMatrix to save and restore the unrotated coordinate system.
44

NOTES

46       This  rotation  follows  the  right-hand rule, so if the vector (x,y,z)
47       points toward the user, the rotation will be counterclockwise.
48

ERRORS

50       GL_INVALID_OPERATION is generated if glRotate is executed  between  the
51       execution of glBegin and the corresponding execution of glEnd.
52

ASSOCIATED GETS

54       glGet with argument GL_MATRIX_MODE
55       glGet with argument GL_COLOR_MATRIX
56       glGet with argument GL_MODELVIEW_MATRIX
57       glGet with argument GL_PROJECTION_MATRIX
58       glGet with argument GL_TEXTURE_MATRIX
59

SEE ALSO

61       glMatrixMode(3G),   glMultMatrix(3G),   glPushMatrix(3G),  glScale(3G),
62       glTranslate(3G)
63
64
65
66                                                                  GLROTATE(3G)
Impressum