void GLAPIENTRY glRotatef( GLfloat angl )
PARAMETERS
angl Specifies the angle of rotation, in degrees.
_param2, _param3, _param4
Specify the x, y, and z coordinates of a vector, respectively.
DESCRIPTION
glRotate produces a rotation of angl degrees around the vector (_eqn‐
param2,_eqnparam3,_eqnparam4). The current matrix (see glMatrixMode) is
multiplied by a rotation matrix with the product replacing the current
matrix, as if glMultMatrix were called with the following matrix as its
argument:
_eqnparam22(1−c)+c _eqnparam2_eqnparam3(1−c)−_eqn‐
⎝_eqnparam3_eqnparam2(1−c)+_eqnparam4s
_eqnparam2_eqnparam4(1−c)−_eqnparam3s
param4s0_eqnparam2_eqnparam4(1−c)+_eqnparam3s 0
_eqnparam32(1−c)+c _eqnparam3_eqnparam4(1−c)−_eqnparam2s 0⎠
_eqnparam3_eqnparam4(1−c)+_eqnparam2s _eqnparam42(1−c)+c 0
Where c=cos(angl), s=sin(angl), and ||(_eqnparam2,_eqnparam3,_eqn‐
param4)||=1 (if not, the GL will normalize this vector).
If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all objects
drawn after glRotate is called are rotated. Use glPushMatrix and
glPopMatrix to save and restore the unrotated coordinate system.
NOTES
This rotation follows the right-hand rule, so if the vector (_eqn‐
param2,_eqnparam3,_eqnparam4) points toward the user, the rotation will
be counterclockwise.
ERRORS
GL_INVALID_OPERATION is generated if glRotate is executed between the
execution of glBegin and the corresponding execution of glEnd.
ASSOCIATED GETS
glGet with argument GL_MATRIX_MODE
glGet with argument GL_COLOR_MATRIX
glGet with argument GL_MODELVIEW_MATRIX
glGet with argument GL_PROJECTION_MATRIX
glGet with argument GL_TEXTURE_MATRIX
SEE ALSO
glMatrixMode, glMultMatrix, glPushMatrix, glScale, glTranslate
GLROTATE(3G)
Man(1) output converted with
man2html