|
Download the example projects for your preferred IDE, unzip, copy to OF's apps folder and build-run any of the projects. If your preferred IDE is not listed below you can still use the example code but you will have to set up your own project files. Feel free to post to the forum if you get stuck. It is the fastest way to get help. Your folder structure should look something this:
/openFrameworks
/addons
/apps
/addonsExamples
/examples
/touchkitExamples
/helloWorldExample
/pngBrushExample
...
/libs
/other
helloWorldExample
A simple TouchKit app looks very similar to a regular OpenFrameworks app. There are generally three files of interest: testApp.h, testApp.cpp, and main.cpp. The testApp files contain the main app class which gets running from a very minimal main.cpp. The main app class inherits from ofxTouchApp (instead from ofSimpleApp) and offers three multitouch-specific event handlers: fingerDragged(...), fingerPressed(...), and fingerReleased(...). These handlers can be used in a very similar manner as mouse event handlers. One notable difference is that fingers have ids to distinguish between multiple fingers. The two most important classes to understand are ofxTouchApp and ofxTouchFinger. Both are documented in more detail on the reference pages. pngBrushExample
This is a variation of Graffiti Research Lab's L.A.S.E.R Tag ported to the TouchKit. It is effectively a painting app with paint drips included. Technically it demonstrates photoshop-like bitmap brush with customizable shapes. Designed with OpenFrameworks and produced with the support of Eyebeam Atelier. |
|