我有4x4矩阵对象的变换。
I have 4x4 matrix for object's transformations.
float mat44[16];
但我不知道如何使用我的矩阵更新的OpenGL模型视图矩阵。我应该使用的glTranslatef()/ glRotatef()有初步认识的值从我的基质或者我应该使用glLoadMatrix(),glMultMatrix()?请帮助。谢谢你。
But i don't know how to update OpenGL ModelView matrix using my matrix. should i use glTranslatef()/glRotatef() with relavant values from my matrix or should i use glLoadMatrix(),glMultMatrix() ? Pls help. Thanks.
如果你想申请已在OpenGL的矩阵堆栈的改造,目前改造,那么你应该写:
If you want to apply your transformation to current transformation already in OpenGL matrix stack, then you should write:
glMultMatrixf(mat44);
但是,如果你要放弃什么目前OpenGL的矩阵堆栈的顶部,并使用自己的转型,那么你应该写:
But if you want to discard what's currently on top of OpenGL matrix stack and use your own transformation, then you should write:
glLoadMatrixf(mat44);
下一篇:Windows 7的64 / Visual Studio 2008中/ OpenCV2.1错误:"应用程序无法正常启动(0xhex).."无法正常、应用程序、错误、Studio