Contents / Previous / Next


Translate

glTranslate multiplies the current matrix by a matrix that moves (translates)
an object by the given x, y, and z values
(or moves the local coordinate system by the same amounts).
   void glTranslate{fd}(TYPEx, TYPE y, TYPEz);
The translation vector is used to compute a 4x4 translation matrix:


The current matrix is multiplied by this translation matrix, with the product replacing the current matrix.
That is, if M is the current matrix and T is the translation matrix, then M is replaced with M o T.