front_processing/src/Trakers_gestures/Trakers_gestures.pde
author bastiena
Fri, 23 Mar 2012 16:24:36 +0100
changeset 10 925b7ee746e3
parent 9 0f44b7360c8d
child 27 6c08d4d7219e
permissions -rw-r--r--
Front Processing : Changed utf-8 to utf-8 without BOM

/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
*
* For the full copyright and license information, please view the LICENSE_FRONT
* file that was distributed with this source code.
*/

import TUIO.*;
TuioProcessing tuioClient;

/*FONCTION D'INITIALISATION
Entrée :
Sortie : Création de la fenêtre et du client TUIO*/
void setup()
{
    size (640, 480);
    showMask();
    tuioClient = new TuioProcessing(this, 80);
    textAlign(CENTER);
    imageMode(CENTER);
    smooth();
}

/*FONCTION DE DESSIN
Entrée :
Sortie : Appel à la fonction de traitement d'input du serveur toutes les n millisecondes*/
void draw()
{
    fill(0);
    tuioInput();
    noStroke();
}

/*FONCTION DE GENERATION DU MASQUE
Entrée :
Sortie : Place des rectangles autour de la zone de dessin*/
void showMask()
{
    background(0);
    fill(255);
    rect(0, 80, width, height-130);
}

/*FONCTION D'AFFICHAGE DU CODE DE LA GESTURE DETECTEE
Entree :
Sortie : Affichage du code de la gesture*/
void showGestureMessage(TuioString tstr)
{
    text("Gesture détectée : " + tstr.getMessage(), width/2 - 20, 20);
}