MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
GLROTATE(3G)                                                      GLROTATE(3G)



NAME
       glRotated,, glRotatef - multiply the current matrix by a rotation matrix


C SPECIFICATION
       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.

DESCRIPTION
       glRotate produces a rotation of angle degrees around the vector (x,  y,
       z).   The current matrix (see glatrixode) is multiplied by a rotation
       matrix  with  the  product  replacing  the  current   matrix,   as   if
       glultatrix were called with the following matrix as its argument:


         x^2(1-c)]c     xy(1-c)-zs     xz(1-c)]ys     0
         yx(1-c)]zs     y^2(1-c)]c     yz(1-c)-xs     0
         xz(1-c)-ys     yz(1-c)]xs     z^2(1-c)]c     0
              0              0               0        1



       Where  c = cos (angle), s = sin (angle), and (x, y, z) = 1 (if not,
       the GL will normalize this vector).



       If the matrix mode is either GLMODELVIEW or GLPROJECTION, all objects
       drawn  after  glRotate  is  called  are  rotated.  Use glPushatrix and
       glPopatrix to save and restore the unrotated coordinate system.

NOTES
       This rotation follows the right-hand rule, so if the vector (x,  y,  z)
       points toward the user, the rotation will be counterclockwise.

ERORS
       GLINVALIDOPERATION  is  generated if glRotate is executed between the
       execution of glBegin and the corresponding execution of glEnd.

ASOCIATED GETS
       glGet with argument GLMATRIXMODE
       glGet with argument GLCOLORMATRIX
       glGet with argument GLMODELVIEWMATRIX
       glGet with argument GLPROJECTIONMATRIX
       glGet with argument GLTEXTUREMATRIX

SEE ALSO
       glatrixode, glultatrix, glPushatrix, glScale, glTranslate



                                                                  GLROTATE(3G)
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™