[vtk-developers] Gesture events

Ken Martin ken.martin at kitware.com
Wed Feb 17 11:09:44 EST 2016


I have been working on adding gesture support to VTK off and on and I have
some more changes I wanted to mention. Initially I had added support for
multitouch into the RenderWindowInteractor allowing for multiple pointers
and tracking multiple pointer locations. That seems to be working fine. The
next step was to consider multitouch gestures such as pinch/rotate/pan that
iOS and Android can generate. I wanted VTK to be capable of accepting lower
level multitouch events and higher level gestures at the discretion of the
application developer. I also wanted to have high level gestures (such as
pinch) added to VTK because adding support for pinch in a widget is a lot
easier than putting in the code to recognize and handle the pinch in the
widget itself.  So I have created a new topic

https://gitlab.kitware.com/vtk/vtk/merge_requests/1221

that adds pinch/rotate/pan/tap/long tap/swipe gestures to VTK. You can
invoke those gestures directly from your UI code or pass the low level
touch events down to VTK's interactor. When passing the low level touch
events the interactor will by default recognize the pinch/pan/rotate
gestures for you and convert the touch events into gesture events.

This way VTK Widgets and Interactor Styles can be modified to respond to
gestures regardless of if the application chooses to send touch events or
gestures.

To test this out I created a new iOS example app called PlaneView that
loads 3D data from your cloud drive and allows you to cut it with a probe
filter. Hopefully I can get it on the app store for folks to try out, it is
in review currently. (thanks to Steve Jordan for the icons :-) The example
also shows how to register file types in iOS, add settings, and is a
storyboard based app.

One limitation of what I have put into VTK is that it only handles one
gesture at a time. A lot of VTK's interaction code tends to be state based,
you are rotating or you are zooming. We really do not have a notion of
interaction being in multiple states at once. But iOS for example can have
multiple gestures being recognized and handled at the same time if you
enable that. Currently the code in VTK is designed to handle one gesture at
a time. I'm not sure if we want to handle having a rotate gesture start
while in the middle of a pinch gesture and try to have all the
interactors/widgets handle those cases properly/etc.

Thanks
Ken


-- 
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160217/b77e8474/attachment.html>


More information about the vtk-developers mailing list