translate(3G) translate(3G)
translate - translates the current matrix
void translate(x, y, z)
Coord x, y, z;
x expects the x coordinate of a point.
y expects the y coordinate of a point.
z expects the z coordinate of a point.
translate moves the coordinate system origin to a point specified in the
current coordinate system. The x, y, and z coordinates are used to
compute a 4x4 translation matrix, which then premultiplies the current
matrix, as specified by mmode. Thus if T is the current matrix, and X is
the translation matrix computed by translate, T is replaced with X*T.
The current matrix is the top matrix on the transformation stack if mmode
is MSINGLE, the top matrix on the ModelView matrix stack if mmode is
MVIEWING, the Projection matrix if mmode is MPROJECTION, or the Texture
matrix if mmode is MTEXTURE.
All objects drawn after translate is called while mmode is either MSINGLE
or MVIEWING are translated. Use pushmatrix and popmatrix to preserve and
restore the untranslated coordinate system.
mmode, popmatrix, pushmatrix, rotate, scale
PPPPaaaaggggeeee 1111 [ Back ]
|