从opengl中的glRotatef()获得旋转矩阵
有没有办法获得opengl中由命令glRotatef()生成的旋转矩阵?
Is there a way to get the rotation matrix which is generated by command glRotatef()
in opengl?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
否,但您可以使用
glGetFloatv
获取当前矩阵。如果你只想要旋转矩阵,我认为你应该自己计算。No, but you can get the current matrix with
glGetFloatv
. If you want just the rotation matrix, I think you should compute it yourself.注意:在调用旋转等之前,模型视图矩阵必须初始化为单位矩阵。
Note: the model view matrix must be initialized to the identity matrix before calls to rotate etc.