translate.3gl   [plain text]


'\" e
'\"! eqn | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 translate
.ds Xs 47827 4 translate.gl
.TH GLTRANSLATE 3G
.SH NAME
.B "glTranslated, glTranslatef
\- multiply the current matrix by a translation matrix

.SH C SPECIFICATION
void \f3glTranslated\fP(
GLdouble \fIx\fP,
.nf
.ta \w'\f3void \fPglTranslated( 'u
	GLdouble \fIy\fP,
	GLdouble \fIz\fP )
.fi
void \f3glTranslatef\fP(
GLfloat \fIx\fP,
.nf
.ta \w'\f3void \fPglTranslatef( 'u
	GLfloat \fIy\fP,
	GLfloat \fIz\fP )
.fi

.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\f2x\fP\ \f2y\fP\ \f2z\fP\ \ 'u 
\f2x\fP, \f2y\fP, \f2z\fP
Specify the \f2x\fP, \f2y\fP, and \f2z\fP coordinates of a translation vector.
.SH DESCRIPTION
\%\f3glTranslate\fP produces a translation by 
$("x","y","z")$.
The current matrix
(see 
.br
\%\f3glMatrixMode\fP)
is multiplied by this translation matrix,
with the product replacing the current matrix, as if
\%\f3glMultMatrix\fP were called with the following matrix
for its argument:
.sp
.ce
.EQ
left (  ~ down 20 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 )
.EN
.sp
.RE
If the matrix mode is either \%\f3GL_MODELVIEW\fP or \%\f3GL_PROJECTION\fP,
all objects drawn after a call to \%\f3glTranslate\fP are translated.
.P
Use \%\f3glPushMatrix\fP and 
\%\f3glPopMatrix\fP to save and restore
the untranslated coordinate system.
.SH ERRORS
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glTranslate\fP
is executed between the execution of \%\f3glBegin\fP
and the corresponding execution of \%\f3glEnd\fP.
.bp
.SH ASSOCIATED GETS
\%\f3glGet\fP with argument \%\f3GL_MATRIX_MODE\fP
.br
\%\f3glGet\fP with argument \%\f3GL_COLOR_MATRIX\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MODELVIEW_MATRIX\fP
.br
\%\f3glGet\fP with argument \%\f3GL_PROJECTION_MATRIX\fP
.br
\%\f3glGet\fP with argument \%\f3GL_TEXTURE_MATRIX\fP
.SH SEE ALSO
\%\f3glMatrixMode(3G)\fP,
\%\f3glMultMatrix(3G)\fP, 
\%\f3glPushMatrix(3G)\fP,
\%\f3glRotate(3G)\fP,
\%\f3glScale(3G)\fP