1GLROTATE(3G) OpenGL Manual GLROTATE(3G)
2
3
4
6 glRotate - multiply the current matrix by a rotation matrix
7
9 void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
10
11 void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
12
14 angle
15 Specifies the angle of rotation, in degrees.
16
17 x, y, z
18 Specify the x, y, and z coordinates of a vector, respectively.
19
21 glRotate produces a rotation of angle degrees around the vector x y z.
22 The current matrix (see glMatrixMode()) is multiplied by a rotation
23 matrix with the product replacing the current matrix, as if
24 glMultMatrix() were called with the following matrix as its argument:
25
26 x 2 1 - c + c x y 1 - c - z s x z 1 - c + y s 0 y x 1
27 - c + z s y 2 1 - c + c y z 1 - c - x s 0 x z 1 - c - y
28 s y z 1 - c + x s z 2 1 - c + c 0 0 0 0 1
29
30 Where c = cos angle, s = sin angle, and x y z = 1 (if not, the GL
31 will normalize this vector).
32
33 If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all objects
34 drawn after glRotate is called are rotated. Use glPushMatrix() and
35 glPopMatrix() to save and restore the unrotated coordinate system.
36
38 This rotation follows the right-hand rule, so if the vector x y z
39 points toward the user, the rotation will be counterclockwise.
40
42 GL_INVALID_OPERATION is generated if glRotate is executed between the
43 execution of glBegin() and the corresponding execution of glEnd().
44
46 glGet() with argument GL_MATRIX_MODE
47
48 glGet() with argument GL_COLOR_MATRIX
49
50 glGet() with argument GL_MODELVIEW_MATRIX
51
52 glGet() with argument GL_PROJECTION_MATRIX
53
54 glGet() with argument GL_TEXTURE_MATRIX
55
57 glMatrixMode(), glMultMatrix(), glPushMatrix(), glScale(),
58 glTranslate()
59
61 Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
62 under the SGI Free Software B License. For details, see
63 http://oss.sgi.com/projects/FreeB/.
64
66 opengl.org
67
68
69
70opengl.org 06/10/2014 GLROTATE(3G)