glTranslate - Khronos Registry
文章推薦指數: 80 %
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.
延伸文章資訊
- 1OpenGL中平移函数glTranslatef()、旋转函数glRotatef()的理解
void glTranslatef(GLfloat x,GLfloat y,GLfloat z);函数功能:沿X轴正方向平移x个单位(x是有符号数) 沿Y轴正方向平移y个单位(y是有符号数) 沿...
- 2《高效学习OpenGL》之模型变换glTranslatef(), glRotatef ...
《高效学习OpenGL》之模型变换glTranslatef(), glRotatef(),glScalef(),1.移动glTranslatef(GLfloatx,GLfloaty,GLfloa...
- 3glTranslatef 函式(Gl.h) - Win32 apps | Microsoft Docs
void WINAPI glTranslatef( GLfloat x, GLfloat y, GLfloat z );. 參數. x. 轉譯向量的x 座標。 y. 轉譯向量的Y 座標。 z. ...
- 4glTranslate - Khronos Registry
void glTranslatef(, GLfloat x ,. GLfloat y ,. GLfloat z ) ;. Parameters. x , y , z. Specify the x...
- 5Transformations in OpenGL - Carnegie Mellon University
glMatrixMode(GL_MODELVIEW);. glLoadIdentity();. glTranslatef(0.0,0.0,-6.0);. glRotatef(45.0,0.0,1...