glrotatef

The glRotated and glRotatef functions multiply the current matrix by a rotation matrix.

基本介紹

  • 中文名:glrotatef
  • 外文名:glrotatef
  • 概念:The glRotated and glRotatef functions multiply the current matrix by a rotation matrix.
glRotated, glRotatef
voidglRotated( GLdouble angle,
GLdouble x,
GLdouble y,
GLdouble z
);
voidglRotatef(
GLfloat angle,
GLfloat x,
GLfloat y,
GLfloat z
);
Parameters angle The angle of rotation, in degrees.x, y, z The x,y, and z coordinates of a vector, respectively. Remarks
The glRotate function computes a matrix that performs a counterclockwise rotation of angle degrees about the vector from the origin through the point (x,y,z).
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 translation matrix, then M is replaced with M·R.
If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all objects drawn after glRotate is called are rotated. Use glPushMatrixand glPopMatrix to save and restore the unrotated coordinate system.

相關詞條

熱門詞條

聯絡我們