diff -r 8a21bec5d45f -r e4e7db2435f8 front_processing/src/Interaction_examples/Hand_signal/Hand_signal.pde --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/front_processing/src/Interaction_examples/Hand_signal/Hand_signal.pde Thu Mar 22 16:00:17 2012 +0100 @@ -0,0 +1,81 @@ +/* +* This file is part of the TraKERS\Front Processing package. +* +* (c) IRI +* +* For the full copyright and license information, please view the LICENSE_FRONT +* file that was distributed with this source code. +*/ + +/*Exemple tiré de processing.org*/ + +import TUIO.*; +TuioProcessing tuioClient; +int port = 80; +//Taille de la fenêtre +int WIDTH = 640, HEIGHT = 480; + +float minDistHands = 1, maxDistHands = 1.5; +//Distance de "click" minimum/maximum avec la main. +float minClickHand = minDistHands+0.2, maxClickHand = maxDistHands-0.2; +//Définit les coordonnées de la main la plus proche et si elle a cliqué (se trouve dans une certaine zone du champ d'intéraction). +int X, Y; +boolean clicked; + +int[] xvals; +int[] yvals; +int[] bvals; + +void setup() +{ + size(WIDTH, HEIGHT); + tuioClient = new TuioProcessing(this, port); + xvals = new int[width]; + yvals = new int[width]; + bvals = new int[width]; +} + +int arrayindex = 0; + +void draw() +{ + tuioInput(); + background(102); + + for(int i=1; i