开发者

OpenGL JOGL Camera that can be moved by keyboard

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 whe开发者_如何学Pythonre to start with this one. Many tutorials around on google, but not for jogl :/


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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜