C++基本qt问题
有人知道使用 Qt 添加旋转和移动 3D 模型的功能的快速方法吗?
显然,我必须根据鼠标和键盘的移动对世界矩阵进行更改,因此我应该以某种方式处理适当的 mouseEvents
和 keyboardEvens
。
对于 3D 相机来说,这似乎有点棘手,虽然我可以自己实现它,但我最好坚持做好准备。
有谁知道或有一个处理此类操作并将其反映到的示例吗?世界矩阵?
谢谢。
Does someone know a fast way to add the ability to rotate and move a 3D model using Qt?
Obviously, I have to make changes to the world matrix based on the mouse and keyboard movements, and hence I should somehow handle the appropriate mouseEvents
and keyboardEvens
.
For a 3d camera this seems a bit tricky and although I could implement it myself, I'd better stick to something ready.
Does anyone know or have an example which handles this kind of actions and reflects them to the world matrix?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能就是您要找的。这是一个加载 .obj 模型并允许您用鼠标旋转它们的示例。它还向您展示了如何在 OpenGL 场景中渲染 Qt 对话框。
This might be what you're looking for. It is an example that loads .obj models and allows you to rotate them with the mouse. It also shows you how to render Qt dialogs within the OpenGL scene.