WorldWind Multitouch Plugin


Notes

This is a rudimentary, stub, C# WorldWind plugin which listens for multitouch input using the TUIO protocol, and interprets a basic set of finger gestures to control WorldWind. Supported gestures are single finger drag to spin the globe, pinch and spread to zoom, and two-finger rotate to roll the camera.

You'll need:

  • NASA WorldWind 1.4
  • A working installation of touchlib or reacTIVision

The touchlib library source can be downloaded here. Compiled Win32 binaries are available here. Since I don't have a multitouch input surface I just used the simple-2point.avi sample input movie provided with touchlib and tweaked the image processing parameters for best results (using this config.xml file). Once you've downloaded touchlib, use my config.xml file, download the sample movie, and then run OSC.exe. OSC will process the input movie data and broadcast TUIO events.

The code is based off the reacTIVision C# TUIO client by Martin Kaltenbrunner.

The compiled plugin and source code are here: DanTouchEarthPlugin.dll

The meat of the code is in DanTouchEarth.cs. TuioFinger.cs defines a 'TuioFinger' class which is used to track individual fingers. Other files are from the reacTIVision code and handling interpretation of the OSC/TUIO messages.

This code is provided "as-is". You may use it for any purpose without restriction. The reacTIVision and OSC portions of the code from reacTIVision come with different licensing requests as noted in the source code files.

To run the plugin:

Copy DanTouchEarthPlugin.dll into your WorldWind 'Plugins' folder, start WorldWind, and use the Plugins menu to load the 'DanTouchEarthPlugin' plugin. Once the plugin is loaded, it will start listening for TUIO events. Next, use touchlib (run OSC.exe) or (easier) the JAVA TUIO_Simulator to generate TUIO events. Watch the Earth move in worlderful ways.