Login  Register

Re: Input events - Design help

Posted by krishnak on Feb 28, 2013; 3:31am
URL: https://forum.jogamp.org/Input-events-Design-help-tp4028400p4028407.html

As I am new to the code base, please correct me if my observation is incorrect

Application Class  instantiates the  InputManager Class with a JoyInput . InputManager sets itself as the listener for the JoyInput or MouseInput

In the Programmers application we call inputManager.addListener to register a listener to perform the programmers logic.

So all event based logic happens inside InputManager.

The MouseInput or JoyInput objects are passed to the InputManager from a JmeContext object.


JmeContext is implemented by JoglContext/ AwtPanelsContext

JoglContext gets mouse Input  from  ???? - I am not clear how the System Mouse details gets in to JMEContext -Is it just using AwtKeyInput

Is it AwtPanelsContext that is providing the mouse and Keyboard inputs?

 I can include a new class MyNewtJoyInput inside  jogl/com/jme3/input/jogl/  to read my GPIO ports -- this is probably what you are referring in your Edit 2? -

If I implement my MyNewtJoyInput  -  how do I pass the joyInput Object to JoglContext.java or JmeContext.Java so that getJoyInput returns a value? How do I bind my NewtJoyInput to a Jmecontext  - I am confused at this point. Please enlighten.