Hello,<div><br></div><div><br></div><div>I always wanted to use multi-touch gestures such as the pinching, rotating, or swiping features of recent apple&#39;s computers in VTK to control zooming, spining and panning of my objects in 3D.</div>

<div><br></div><div><br></div><div>Maybe this was already integrated in the VTK master branch (though I didn&#39;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:</div>

<div>- PinchGestureEvent</div><div>- RotateGestureEvent</div><div>- SwipeGestureEvent</div><div><br></div><div><br></div><div>I wrote interfaces in the vtkCocoaGLView class to translate Cocoa&#39;s events into those, and I wrote callbacks to handle them properly in vtkInteractorStyleTrackballCamera just as a proof of concept.</div>

<div><br></div><div>Moreover, Qt 4.6 proposes gesture events (QGestureEvents) that I properly interfaced in the QVTKWidget class.</div><div><br></div><div><br></div><div>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.</div>

<div><br></div><div><br></div><div>If anyone is interested, I would be happy to share the code, or even give it to kitware for review / integration.</div><div><br></div><div><br></div><div>Anyone can access it anonymously here. These are just files which should be replaced in your VTK source tree:</div>

<div><br></div>svn checkout svn://<a href="http://scm.gforge.inria.fr/svn/parietal-public/Utilities/VTKMultiTouch">scm.gforge.inria.fr/svn/parietal-public/Utilities/VTKMultiTouch</a><div><br></div><div><br></div><div>Note that modifications are based on VTK 5.6 and Qt 4.6. And you need a multi-touch device, of course.<br>

<div><br></div><div><br></div><div>Cheers,</div><div>Pierre.<br><br></div><div>-- <br>Pierre Fillard, Ph.D.,<br>Research Scientist<br>INRIA Parietal - Neurospin<br>Bât 145, Point Courrier 156<br>91191 Gif/Yvette, France<br>

tel: +33 1 69 08 79 92<br>
</div></div>