glRotate
NAME
glRotated, glRotatef -- multiply the current matrix by a rotation matrix
将当前矩阵和一个旋转矩阵相乘。
C SPECIFICATION
c语言说明
void glRotated(GLdouble angle,
GLdouble x,
GLdouble y,
GLdouble z)
void glRotatef(GLfloat angle,
GLfloat x,
GLfloat y,
GLfloat z)
PARAMETERS
参数
angle
Specifies the angle of rotation, in degrees.
指定旋转角度,以度数为单位。
x, y, z
Specify the x, y, and z coordinates of a vector, respectively.
分别指定矢量x,y,z坐标,
DESCRIPTION
描述
glRotate computes a matrix that performs a counterclockwise rotation of angle degrees about the vector from the origin through the point (x, y, z).
glRotate计算出一个绕从原点出发,通过点(x,y,z)的矢量逆时针旋转angle度的矩阵。
The current matrix (see glMatrixMode) is multiplied by this rotation matrix, with the product replacing the current matrix. That is, if M is the current matrix and R is the rotation matrix, then M is replaced with M * R.
当前矩阵乘旋转矩阵,结果替代当前矩阵。也就是说,如果m是当前矩阵,r是旋转矩阵,m将被m*r代替。
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.
如果矩阵既不是GL_MODELVIEW模式,也不是GL_PROJECTION模式,所有调用glRotate之后画出的图形都是旋转了的。使用glPushMatrix和glPopMatrix来保存和恢复未旋转的坐标系。
ERRORS
错误
GL_INVALID_OPERATION is generated if glRotate is called between a call to glBegin and the corresponding call to glEnd.
如果在glBegin和相应的glEnd之间调用glRotate,将会产生GL_INVALID_OPERATION错误
ASSOCIATED GETS
相关
glGet with argument GL_MATRIX_MODE
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
--------------------------------------------------------------------------------
back to the OpenGL index page
--------------------------------------------------------------------------------
? 1995 Uwe Behrens. All rights reserved.
NAME
glRotated, glRotatef -- multiply the current matrix by a rotation matrix
将当前矩阵和一个旋转矩阵相乘。
C SPECIFICATION
c语言说明
void glRotated(GLdouble angle,
GLdouble x,
GLdouble y,
GLdouble z)
void glRotatef(GLfloat angle,
GLfloat x,
GLfloat y,
GLfloat z)
PARAMETERS
参数
angle
Specifies the angle of rotation, in degrees.
指定旋转角度,以度数为单位。
x, y, z
Specify the x, y, and z coordinates of a vector, respectively.
分别指定矢量x,y,z坐标,
DESCRIPTION
描述
glRotate computes a matrix that performs a counterclockwise rotation of angle degrees about the vector from the origin through the point (x, y, z).
glRotate计算出一个绕从原点出发,通过点(x,y,z)的矢量逆时针旋转angle度的矩阵。
The current matrix (see glMatrixMode) is multiplied by this rotation matrix, with the product replacing the current matrix. That is, if M is the current matrix and R is the rotation matrix, then M is replaced with M * R.
当前矩阵乘旋转矩阵,结果替代当前矩阵。也就是说,如果m是当前矩阵,r是旋转矩阵,m将被m*r代替。
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.
如果矩阵既不是GL_MODELVIEW模式,也不是GL_PROJECTION模式,所有调用glRotate之后画出的图形都是旋转了的。使用glPushMatrix和glPopMatrix来保存和恢复未旋转的坐标系。
ERRORS
错误
GL_INVALID_OPERATION is generated if glRotate is called between a call to glBegin and the corresponding call to glEnd.
如果在glBegin和相应的glEnd之间调用glRotate,将会产生GL_INVALID_OPERATION错误
ASSOCIATED GETS
相关
glGet with argument GL_MATRIX_MODE
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
--------------------------------------------------------------------------------
back to the OpenGL index page
--------------------------------------------------------------------------------
? 1995 Uwe Behrens. All rights reserved.