Middleware :
GPL License added.
Front Processing :
GPL License added.
Front IDILL :
extern altered to send TUIO cursors from Middleware to Front.
implemented as a plugin.
/*
* 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
* file that was distributed with this source code.
*/
/*FONCTION DE RECEPTION DES MESSAGES OSC
Entrée :
Sortie : Appel aux différentes fonctions de dessin si un message est reçu*/
void tuioInput()
{
Vector tuioCursorList = tuioClient.getTuioCursors();
if(tuioCursorList.size() == 1)
{
handleOneHand((TuioCursor)tuioCursorList.elementAt(0));
}
else if(tuioCursorList.size() == 2)
{
handleBothHands(tuioCursorList);
}
}
/*FONCTION DE GESTION DES COURBES POUR UNE MAIN DETECTEE
Entrée : Un curseur TUIO
Sortie : Appel aux différentes fonctions de dessin si un message est reçu*/
void handleOneHand(TuioCursor handCursor)
{
TuioPoint pt = handCursor.getPosition();
update(pt, null);
}
/*FONCTION DE GESTION DES COURBES POUR DEUX MAINS DETECTEES
Entrée : La liste des curseurs TUIO
Sortie : Appel aux différentes fonctions de dessin si un message est reçu*/
void handleBothHands(Vector tuioCursorList)
{
TuioCursor handLeftCursor = (TuioCursor)tuioCursorList.elementAt(0);
TuioCursor handRightCursor = (TuioCursor)tuioCursorList.elementAt(1);
TuioPoint _pt1, _pt2;
_pt1 = (TuioPoint)handLeftCursor.getPosition();
_pt2 = (TuioPoint)handRightCursor.getPosition();
update(_pt1, _pt2);
}