Thanks for the directions! But I'm running into apparently silly problems. I am basically try to find a way where I can deal with mouse and key events, and 'tell' the involved objects to act accordinglt. I would appreciate if someone could spot what's wrong with the following?
I have a main class, with the following methods:
start rendering peer, canvas3d, universe,..
addMouseListener( eventManager --> which is a class that holds a Vector of events to be dealt with)
goes through events in the queue, and process it.
For example, if mouse was released call pick(x,y)
try to pick some objects:
PickRenderResult results = view.pick(canvas, x, y, 3, 3);
The problem is that I get the following:
java.lang.Error: Pick initiated not from rendering thread
What's meant by the rendering thread? It's the thread from where view.renderOnce() is called, right? Can another thread be granted permission to call the View.pick() ?
Is it necessary to have a queue to hold the events? Can't events be processed straight from the EventListener class? (instead of just setting up some flags)
[All this is very interesting..