Hi Thomas,

Am 11.09.10 22:56, schrieb Thomas Hogarth:
> Hi Stephan and everyone else
> 
> I've been thinking a little about multi touch support for osgGA for use with
> IPhones and other multi touch devices. I've got a few things I'd like others
> thoughts on before beginning.
> 
> -Firstly do we treat multi touch inputs as completely separate event types,
> or do we have an array for each of the mouse event variables and treat them
> as if there were multiple mice?

I'd say, we'll use the the exisiting event-types , push, drag, release
for touch-events. What is needed is a touch-id-variable to differentiate
between multiple touches at the same time. So we have basic
compatibility to old code and do not bloat the GUIEventAdapter-class too
much, only adding one int. We can even use the _button-property of
EventAdapter. (that's my current approach)

As different multi-touch-devices have different limits (some can handle
2 simultaneous touches only, some others up to 11 (e.g. the iPad)) I'd
say, that we should not limit the number of simultanous touches.

Perhaps we'll need some higher class which saves the states of different
touches and their locations, so it's easier to query for the touches and
their positions, this can be a custom event-handler baseclass.

> -Do we also add support for the other input devices that are now becoming
> common place?
>     -Accelerometers
>     -3 Axis gyros

Personally I handle these types of input with a derived
eventadapter-class which stores the additional data, and can be queried
by a custom event handler.

perhaps it would be a good idea to add an additional variable to the
event-adapter class to differentiate between multiple user-event-types.


I started coding the integration of multi-touch-events into osgGA, you
can have a look at the changeset at:
http://github.com/stmh/osg/commit/f906fc15737fa7af6a179534168d09820cab639d
(no manipulator yet)


just my 2 cents.

cheers,

Stephan

Bytheway: I comitted your cmake integration to the git-repository at
http://github.com/stmh/osg
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to