可通过键盘移动的OpenGL JOGL相机

发布于 2024-11-05 13:27:05 字数 119 浏览 3 评论 0原文

我真的需要一个可以与我的应用程序一起使用的简单相机。我希望能够用键盘控制相机的移动。我只需要它向前和向后移动并相对于 y 轴旋转。 预先感谢您的任何帮助,因为我不知道从哪里开始。谷歌上有很多教程,但没有针对 jogl :/

I really need a simple camera that i could use with my application. I would like to be able to control the movement of the camera with the keyboard. I only really require that it moves forwards and backwards and rotates with respect to the y-axis.
thanks in advance for any help as i don't know where to start with this one. Many tutorials around on google, but not for jogl :/

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我不咬妳我踢妳 2024-11-12 13:27:05

在下载官方 jogl 所包含的文件中,您可以下载(演示、教程等),其中包括“gleem”包,我已经使用过并且非常喜欢它。

gleem 代表:GL-EEM:GL 极其易于使用的操纵器

这是 gleem 的原始页面:http://alumni.media.mit.edu/~kbrussel/gleem/#DEMOS(带有一些漂亮的图像和上下文)

链接到源下载官方的 jogl 页面: http://java.net/projects/jogl

无论如何,无论你如何理解它,在文件中检查这些特定选项:
gleem.TestExaminerViewer.java
gleem.TestHandleBox.java
gleem.TestMultiWin.java
gleem.TestTranslate1.java
gleem.TestTranslate2.java
gleem.Translate1Manip.java
gleem.Translate2Manip.java

并且,我希望您能找到您要找的东西。 gl

PS - 我大胆猜测/假设您想要控制某种可见的“相机”,而不是按说法仅更新 model_matrix 堆栈(如果是后者,当然只需将您的按键绑定到当您调用更新矩阵堆栈时传入的不同值,ala 使用“gluLookAt”...等)

among the files included with downloading the official jogl things you can download (demos, tutorials, etc) is included the 'gleem' package, which I've used and quite like.

gleem stands for: GL-E-E-M: GL Extremely Easy-to-use Manipulators

here's the original page for gleem: http://alumni.media.mit.edu/~kbrussel/gleem/#DEMOS (with some pretty images, and context for)

link to source downloads within the offical-ish jogl page: http://java.net/projects/jogl

anyway, however you get it, amongst the file check out these specific options:
gleem.TestExaminerViewer.java
gleem.TestHandleBox.java
gleem.TestMultiWin.java
gleem.TestTranslate1.java
gleem.TestTranslate2.java
gleem.Translate1Manip.java
gleem.Translate2Manip.java

and, I'd expect you'll find what you're looking for. gl

PS - I'm boldy guessing/assuming that you want to control some sort of 'camera' that can be seen, vs. per-say just updating the model_matrix stack (if the later, of course just tie your key bindings to the different values you pass in as you call to update the matrix stack, ala using 'gluLookAt' ... etc)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文