Hi,

Thanks for your replies, it confirms what I was thinking... The iOS way of
sending events seems to be an exception, all the touch technologies I use
(mostly MPX, Windows 7 and TUIO) send them separately, so I think it should
be useful to add to EventQueue a way to track the events to put them
altogether into the GUIEventAdapter, what do you think ?

Cheers,

On Mon, Feb 7, 2011 at 8:45 PM, Stephan Huber <ratzf...@digitalmind.de>wrote:

> Hi Glenn,
>
> Am 07.02.11 12:06, schrieb Serge Lages:
> > I am currently working on getting multi-touch working on Linux with MPX
> > (XInput2), and I would like to use this new system for my events. But
> with
> > XInput (or also with Windows 7), I am receiving all the events
> separately,
> > so what's the best approach to feed the
> > touchesBegan/touchesMoved/touchesEnded methods ? Will I need to store
> each
> > input state internally into the GraphicWindow class to set each time all
> the
> > touch states ?
>
> You'll have to store your touch-points and submit them alltogether as
> one event to the eventqueue, here's some pseudo-code:
>
> osg::ref_ptr<osgGA::GUIEventAdapter> osg_event(NULL);
> for(int i = 0; i < numTouches; i++)
> {
>  // get touch i and corrsponding phase, x and y
>  ...
>  // feed it to the osg_event
>  if (!osg_event) {
>    osg_event = _win->getEventQueue()->touchBegan(i, phase, x, y);
>  } else {
>    osg_event->addTouchPoint(i, phase, x, y);
>  }
> }
>
> As Paul noticed in one of his recent mails, the design of the current
> implementation is not the easiest and cleanest,  but I was happy to have
> something working on my end. So if you have any improvements to the
> design/code, please share them with us, so we get a robust and clean
> multi-touch implementation working consistent on different platforms.
>
> cheers,
> Stephan
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Serge Lages
http://www.tharsis-software.com
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to