You can do along the lines of what Delta3D has done, by using
http://plib.sourceforge.net/ as a source of your data and interfacing it
into OSGGA.

On Tue, May 6, 2008 at 12:10 PM, Stephan Maximilian Huber <
[EMAIL PROTECTED]> wrote:

> Zoltán schrieb:
>
> > Or, is there a way to make an osgEventHandler from a SDL_JOYSTICK
> > interface ? There is an osgviewerSDL in the examples (v2.3.4) but this is
> > for an embedded OSG viewer inside an SDL window... would those work with a
> > joystick ?
> >
>
> You can subclass from osgGA::GUIEventAdapter and add your joistick-data to
> it and feed it to the current event queue. In your eventhandler you can
> dynamic_cast to your subclassed Event-Adapter and read the joystick-data and
> handle it accordingly.
>
> I am using this technique to feed the events from a SpaceNavigaor to a
> custom event-handler.
>
> Or you encapsulate you joystick-data into a custom class and attach via
> setUserData to a GuiEventAdapter and push it with type USER to the
> eventqueue, and handling it in your event-handler.
>
> You can even mimick a mouse by feeding the event-queue with fake
> mouse-events from your joystick-data.
>
>
> HTH,
> Stephan
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
"It is only necessary to make war with five things: with the maladies of the
body, with the ignorances of the mind, with the passions of the body, with
the seditions of the city, with the discords of families." - Tacitus

"The desire for safety stands against every great and noble enterprise." -
Tacitus

"Those who would give up essential liberty to purchase a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin

"Numquam ponenda est pluralitas sine necessitate." - William of Ockham
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to