如何获得偏航,俯仰和横滚从3D矢量矢量、如何获得、偏航

由网友(我堅信我的前途與成績無關)分享简介:我有一个应用到一个位置的方向向量给我的点的相机应该的样子。如何才能使用glRotatef从偏航,俯仰和滚转我得到正确?I have a direction vector that applied to a position gives me the point at which the camera should l...

我有一个应用到一个位置的方向向量给我的点的相机应该的样子。如何才能使用glRotatef从偏航,俯仰和滚转我得到正确?

I have a direction vector that applied to a position gives me the point at which the camera should look. How can I get from that yaw, pitch and roll in order to use glRotatef properly?

在此先感谢

推荐答案

您可能实际上并不需要的偏航,俯仰和横滚。你只需要正确的转换。尝试使用 gluLookAt 来建立它。 文档。

You probably don't actually want the yaw, pitch and roll. You just need the correct transformation. Try using gluLookAt to build it. Documentation.

阅读全文

相关推荐

最新文章