glTranslate - Khronos Registry

文章推薦指數: 80 %
投票人數:10人

void glTranslatef(, GLfloat x ,. GLfloat y ,. GLfloat z ) ;. Parameters. x , y , z. Specify the x, y, and z coordinates of a translation vector. Description. NameglTranslate—multiplythecurrentmatrixbyatranslationmatrixCSpecificationvoidglTranslated(GLdoublex, GLdoubley, GLdoublez); voidglTranslatef(GLfloatx, GLfloaty, GLfloatz); Parametersx,y,z Specifythex,y,andzcoordinatesofatranslationvector. Description glTranslateproducesatranslationby x y z . Thecurrentmatrix (see glMatrixMode) ismultipliedbythistranslationmatrix, withtheproductreplacingthecurrentmatrix,asif glMultMatrixwerecalledwiththefollowingmatrix foritsargument: 1 0 0 x 0 1 0 y 0 0 1 z 0 0 0 1 IfthematrixmodeiseitherGL_MODELVIEWorGL_PROJECTION, allobjectsdrawnafteracalltoglTranslatearetranslated. UseglPushMatrixand glPopMatrixtosaveandrestore theuntranslatedcoordinatesystem. Errors GL_INVALID_OPERATIONisgeneratedifglTranslate isexecutedbetweentheexecutionofglBegin andthecorrespondingexecutionofglEnd. AssociatedGets glGetwithargumentGL_MATRIX_MODE glGetwithargumentGL_COLOR_MATRIX glGetwithargumentGL_MODELVIEW_MATRIX glGetwithargumentGL_PROJECTION_MATRIX glGetwithargumentGL_TEXTURE_MATRIX SeeAlso glMatrixMode, glMultMatrix, glPushMatrix, glRotate, glScale Copyright Copyright©1991-2006 SiliconGraphics,Inc.ThisdocumentislicensedundertheSGI FreeSoftwareBLicense.Fordetails,see https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt.



請為這篇文章評分?