Function glTranslatef

  • glTranslate produces a translation by (𝐱, 𝐲, 𝐳). 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:

    ⎛1ㅤ0ㅤ0ㅤ𝐱⎞

    ⎜0ㅤ1ㅤ0ㅤ𝐲 ⎜

    ⎜0ㅤ0ㅤ1ㅤ𝐳 ⎜

    ⎝0ㅤ0ㅤ0ㅤ1⎠

    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.

    Parameters

    • x: number

      Specifies the x coordinate of the translation vector.

    • y: number

      Specifies the y coordinate of the translation vector.

    • z: number

      Specifies the z coordinate of the translation vector.

    Returns void

    Summary

    multiply the current matrix by a translation matrix

    See

    glTranslate

Generated using TypeDoc