Name
glTranslated, glTranslatef — multiply the current matrix by a translation matrix
C Specification
void glTranslated
|
( |
GLdouble x
, GLdouble y
, GLdouble z
); |
void glTranslatef
|
( |
GLfloat x
, GLfloat y
, GLfloat z
); |
Python Specification
glTranslated
|
( |
x
,
y
,
z
) →
None
|
glTranslatef
|
( |
x
,
y
,
z
) →
None
|
Parameters
-
x, y, z
-
Specify the x, y, and z coordinates of
a translation vector.
Description
glTranslate produces a translation by (x,y,z). The current matrix (see glMatrixMode) is multiplied by this translation matrix, with the product replacing the current matrix, as if
glMultMatrix were called with the following matrix for its argument:
If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all objects drawn
after a call to glTranslate are translated.
Use glPushMatrix and glPopMatrix to
save and restore the untranslated coordinate system.
Errors
GL_INVALID_OPERATION is generated if glTranslate is
executed between the execution of glBegin and the corresponding execution of
glEnd.
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
Python Sample Code
- glTranslated
-
- glTranslatef
-
- OpenGL/Demo/GLE/cone.py Ln#20
- OpenGL/Demo/GLE/helix.py Ln#24
- OpenGL/Demo/GLE/texas.py Ln#52
- OpenGL/Demo/GLUT/examples/molehill.py Ln#114
- OpenGL/Demo/NeHe/lesson18.py Ln#193,209,219
- OpenGL/Demo/NeHe/lesson2.py Ln#85,96
- OpenGL/Demo/NeHe/lesson3.py Ln#85,100
- OpenGL/Demo/NeHe/lesson4.py Ln#97,117
- OpenGL/Demo/NeHe/lesson5.py Ln#97,135
- OpenGL/Demo/NeHe/lesson6-multi.py Ln#139
- OpenGL/Demo/NeHe/lesson6.py Ln#119
- OpenGL/Demo/redbook/fog.py Ln#105
- OpenGL/Demo/redbook/scene.py Ln#92,98,104
- OpenGL/Demo/redbook/teapots.py Ln#105
- OpenGL/Demo/simple/GLE.py Ln#76
- OpenGL/Demo/suite/items/GLE/cone.py Ln#41
- OpenGL/Demo/suite/items/GLE/helix.py Ln#47
- OpenGL/Demo/suite/items/GLUT/geometry/__init__.py Ln#43,65
- OpenGL/Demo/suite/items/GLUT/geometry/solid_dodecahedron.py Ln#12
- OpenGL/Demo/suite/items/GLUT/geometry/wire_dodecahedron.py Ln#12
- OpenGL/Demo/tom/checker.py Ln#35
- OpenGL/Demo/tom/cone.py Ln#36
- OpenGL/Demo/tom/conechecker.py Ln#35,58
- OpenGL/Demo/tom/conesave.py Ln#38
- OpenGL/Demo/tom/fog.py Ln#66
- OpenGL/Demo/tom/pick.py Ln#29
- OpenGL/Demo/twburton/knot.py Ln#169,210
- OpenGLContext/scenegraph/texturetransform.py Ln#22,25,32
- OpenGLContext/scenegraph/transform.py Ln#26,28,45
- OpenGLContext/tests/backgroundobject.py Ln#24
- OpenGLContext/tests/glarrayelement.py Ln#15
- OpenGLContext/tests/glinterleavedarrays.py Ln#10,23
- OpenGLContext/tests/glut_fullscreen.py Ln#19
- OpenGLContext/tests/lightobject.py Ln#15
- OpenGLContext/tests/materialobject.py Ln#27
- OpenGLContext/tests/nehe2.py Ln#58,67
- OpenGLContext/tests/nehe3.py Ln#45,55
- OpenGLContext/tests/nehe4.py Ln#47,63
- OpenGLContext/tests/nehe5.py Ln#39,44
- OpenGLContext/tests/nehe6.py Ln#80
- OpenGLContext/tests/nehe6_multi.py Ln#100
- OpenGLContext/tests/nehe6_timer.py Ln#100
- OpenGLContext/tests/nehe7.py Ln#136
- OpenGLContext/tests/nehe8.py Ln#100
- OpenGLContext/tests/redbook_alpha3D.py Ln#127,134
- OpenGLContext/tests/saveimage.py Ln#14
- OpenGLContext/tests/spincube.py Ln#16
- OpenGLContext/tests/test.py Ln#24
- OpenGLContext/tests/textureobject.py Ln#17
- {LGPL} PyUI/pyui/renderers/openglBase.py Ln#345
- {LGPL} VisionEgg/src/Core.py Ln#670,679,752
- {LGPL} VisionEgg/src/Textures.py Ln#1473