Hi Paul,

please have a look at the thread on osg-submissions where I explain the
details and concepts of multi-touch to Robert:

Am 03.02.11 02:56, schrieb Paul Martz:
> I'm working on a project that needs to generate multitouch events, and I
> have a question about the current (2.9.10) implementation.
> 
> There are three main EventQueue methods for adding three different
> multitouch events:
>   touchBegan()
>   touchMoved()
>   touchEnded()
> And their purpose is quite clear from their names.
> 
> However, all three of them take a TouchPhase parameter:
>         enum TouchPhase {
>             TOUCH_UNKNOWN,
>             TOUCH_BEGAN,
>             TOUCH_MOVED,
>             TOUCH_STATIONERY,
>             TOUCH_ENDED
>         };
> 
> It's not clear to me what it would mean if I were to, for example, call
> touchBegan, and pass in TOUCH_ENDED for the phase. This just doesn't
> make sense to specify a phase that contradicts with the type of event
> I'm adding.
> 
> I must be misunderstanding the purpose of this interface. If you could
> provide some usage insight I would appreciate it. Thanks!

Ok, I'll try my best: An osg-event encapsulate all touch-points in one
event, so an osg event handler get all touchpoints via one event. From
the system side (IOS) I'll get one event with all touch-points (that
might differ for other multi-touch-implementations).

Here's a real life example:

one finger touch started -> one osg-event with touchBegan(TOUCH_BEGAN)
one finger is moving -> one osg-event with touchMoved(TOUCH_MOVED)
one finger released -> one osg-event with touchEnded(TOUCH_ENDED)

So to make it complicate and to illustrate the usage better:

one finger touch started -> one osg-event with touchBegan(TOUCH_BEGAN)
one finger is moving -> one osg-event with touchMoved(TOUCH_MOVED)

a second touch is registered, while the other touch-point is still valid:
a new osg-event is created with touchBegan




_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to