[vtk-developers] Fwd: Handling multi-touch gestures in VTK

David Gobbi david.gobbi at gmail.com
Sat Sep 25 11:19:55 EDT 2010


Hi Pierre,

These multi-touch gestures are a must-have.  I've rebased your code
against the VTK head and set up a branch on github:
http://github.com/dgobbi/VTK/commits/multi-touch

I've tried it with Cocoa, and the code works well except for swipes:

iren->SetSwipeGestureDirection(x) with x=up, down, left, or right

I'm not familiar with multi-touch APIs, but I do not think that this
is not the right approach.  But keep going, I'm eager to see more.  As
soon as the swipe/pan is working nicely, I'd love to see this pushed
into VTK.

   David


On Wed, Sep 15, 2010 at 5:46 AM, Pierre Fillard
<pierre.fillard at gmail.com> wrote:
> I forward this mail to the VTK developers, as you may be interested as well.
>
> Pierre.
>
> ---------- Forwarded message ----------
> From: Pierre Fillard <pierre.fillard at gmail.com>
> Date: Wed, Sep 15, 2010 at 11:06 AM
> Subject: Handling multi-touch gestures in VTK
> To: vtkusers at vtk.org
>
>
> Hello,
>
> I always wanted to use multi-touch gestures such as the pinching, rotating,
> or swiping features of recent apple's computers in VTK to control zooming,
> spining and panning of my objects in 3D.
>
> Maybe this was already integrated in the VTK master branch (though I didn't
> see it) or planned to be integrated. But to support my needs, I added
> support for those new gesture interactions in VTK by adding three new events
> in the vtkCommand class:
> - PinchGestureEvent
> - RotateGestureEvent
> - SwipeGestureEvent
>
> I wrote interfaces in the vtkCocoaGLView class to translate Cocoa's events
> into those, and I wrote callbacks to handle them properly in
> vtkInteractorStyleTrackballCamera just as a proof of concept.
> Moreover, Qt 4.6 proposes gesture events (QGestureEvents) that I properly
> interfaced in the QVTKWidget class.
>
> Thus, with these modifications, using either a Cocoa RenderWindow or a
> QVTKWidget instance, one is able to zoom by pinching, rotate by drawing a
> circle on a multi-touch device or panning by (long-)taping on the trackpad.
>
> If anyone is interested, I would be happy to share the code, or even give it
> to kitware for review / integration.
>
> Anyone can access it anonymously here. These are just files which should be
> replaced in your VTK source tree:
> svn checkout
> svn://scm.gforge.inria.fr/svn/parietal-public/Utilities/VTKMultiTouch
>
> Note that modifications are based on VTK 5.6 and Qt 4.6. And you need a
> multi-touch device, of course.
>
>
> Cheers,
> Pierre.
>
> --
> Pierre Fillard, Ph.D.,
> Research Scientist
> INRIA Parietal - Neurospin
> Bât 145, Point Courrier 156
> 91191 Gif/Yvette, France
> tel: +33 1 69 08 79 92
>
>
>
> --
> Pierre Fillard, Ph.D.,
> Research Scientist
> INRIA Parietal - Neurospin
> Bât 145, Point Courrier 156
> 91191 Gif/Yvette, France
> tel: +33 1 69 08 79 92
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>



More information about the vtk-developers mailing list