OpenGl学习之glRotate函数

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.
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值