Signature
Parameters
Variables | Description |
---|---|
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
.
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:
Where
,
,
and
(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
points toward the
user, the rotation will be counterclockwise.
Errors
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
Copyright
Copyright
1991-2006
Silicon Graphics, Inc. This document is licensed under the SGI
Free Software B License. For details, see
http://oss.sgi.com/projects/FreeB/
.
Sample Code References
The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.
glRotate
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/THF/Examples/simplecube/simplecube_controlled.py
Lines: 123, 124
{LGPL or GPL or MPL} Kamaelia
Sketches/CL/Topology3D/THF/Examples/simplecube/simplecube.py
Lines: 62
glRotated
glRotatef
{LGPL} Pyggel
pyggel/camera.py
Lines: 58, 59, 60, 77, 78, 79, 83, 84, 85, 102, 103, 104, 109, 110, 111, 115, 116, 117
{LGPL or GPL or MPL} Kamaelia
Code/Python/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/Particles3D.py
Lines: 622
{LGPL or GPL or MPL} Kamaelia
Sketches/MPS/BugReports/FixTests/Kamaelia/Kamaelia/Visualisation/PhysicsGraph3D/Particles3D.py
Lines: 622