1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE book PUBLIC
"-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id=
"glTranslate">
9 <holder>Silicon Graphics, Inc.
</holder>
12 <refentrytitle>glTranslate
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>glTranslate
</refname>
17 <refpurpose>multiply the current matrix by a translation matrix
</refpurpose>
19 <refsynopsisdiv><title>C Specification
</title>
22 <funcdef>void
<function>glTranslated
</function></funcdef>
23 <paramdef>GLdouble
<parameter>x
</parameter></paramdef>
24 <paramdef>GLdouble
<parameter>y
</parameter></paramdef>
25 <paramdef>GLdouble
<parameter>z
</parameter></paramdef>
30 <funcdef>void
<function>glTranslatef
</function></funcdef>
31 <paramdef>GLfloat
<parameter>x
</parameter></paramdef>
32 <paramdef>GLfloat
<parameter>y
</parameter></paramdef>
33 <paramdef>GLfloat
<parameter>z
</parameter></paramdef>
37 <!-- eqn: ignoring delim $$ -->
38 <refsect1 id=
"parameters"><title>Parameters
</title>
41 <term><parameter>x
</parameter></term>
42 <term><parameter>y
</parameter></term>
43 <term><parameter>z
</parameter></term>
46 Specify the
<emphasis>x
</emphasis>,
<emphasis>y
</emphasis>, and
<emphasis>z
</emphasis> coordinates of a translation vector.
52 <refsect1 id=
"description"><title>Description
</title>
54 <function>glTranslate
</function> produces a translation by
55 <inlineequation><mml:math>
57 <mml:mfenced open=
"(" close=
")">
58 <mml:mi mathvariant=
"italic">x
</mml:mi>
59 <mml:mi mathvariant=
"italic">y
</mml:mi>
60 <mml:mi mathvariant=
"italic">z
</mml:mi>
62 </mml:math></inlineequation>.
65 <citerefentry><refentrytitle>glMatrixMode
</refentrytitle></citerefentry>)
66 is multiplied by this translation matrix,
67 with the product replacing the current matrix, as if
68 <citerefentry><refentrytitle>glMultMatrix
</refentrytitle></citerefentry> were called with the following matrix
72 <informalequation><mml:math>
73 <!-- eqn: left ( matrix { ccol { 1 above 0 above 0 above 0 } ccol { 0 above 1 above 0 above 0 } ccol { 0 above 0 above 1 above 0 } ccol { x above y above z above 1} } right ):-->
74 <mml:mfenced open=
"(" close=
")">
87 <mml:mi mathvariant=
"italic">x
</mml:mi>
101 <mml:mi mathvariant=
"italic">y
</mml:mi>
115 <mml:mi mathvariant=
"italic">z
</mml:mi>
134 </mml:math></informalequation>
139 If the matrix mode is either
<constant>GL_MODELVIEW
</constant> or
<constant>GL_PROJECTION
</constant>,
140 all objects drawn after a call to
<function>glTranslate
</function> are translated.
143 Use
<citerefentry><refentrytitle>glPushMatrix
</refentrytitle></citerefentry> and
144 <citerefentry><refentrytitle>glPopMatrix
</refentrytitle></citerefentry> to save and restore
145 the untranslated coordinate system.
148 <refsect1 id=
"errors"><title>Errors
</title>
150 <constant>GL_INVALID_OPERATION
</constant> is generated if
<function>glTranslate
</function>
151 is executed between the execution of
<citerefentry><refentrytitle>glBegin
</refentrytitle></citerefentry>
152 and the corresponding execution of
<citerefentry><refentrytitle>glEnd
</refentrytitle></citerefentry>.
155 <refsect1 id=
"associatedgets"><title>Associated Gets
</title>
157 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MATRIX_MODE
</constant>
160 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_COLOR_MATRIX
</constant>
163 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_MODELVIEW_MATRIX
</constant>
166 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_PROJECTION_MATRIX
</constant>
169 <citerefentry><refentrytitle>glGet
</refentrytitle></citerefentry> with argument
<constant>GL_TEXTURE_MATRIX
</constant>
172 <refsect1 id=
"seealso"><title>See Also
</title>
174 <citerefentry><refentrytitle>glMatrixMode
</refentrytitle></citerefentry>,
175 <citerefentry><refentrytitle>glMultMatrix
</refentrytitle></citerefentry>,
176 <citerefentry><refentrytitle>glPushMatrix
</refentrytitle></citerefentry>,
177 <citerefentry><refentrytitle>glRotate
</refentrytitle></citerefentry>,
178 <citerefentry><refentrytitle>glScale
</refentrytitle></citerefentry>
181 <refsect1 id=
"Copyright"><title>Copyright
</title>
183 Copyright
<trademark class=
"copyright"></trademark> 1991-
2006
184 Silicon Graphics, Inc. This document is licensed under the SGI
185 Free Software B License. For details, see
186 <ulink url=
"http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/
</ulink>.