--- a/.hgignore Thu Mar 22 16:00:17 2012 +0100
+++ b/.hgignore Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-syntax: regexp
+syntax: regexp
middleware/.*/(bin|obj)
syntax: glob
*.suo
@@ -19,3 +19,8 @@
front_processing/src/Interaction_examples/Hands_1D/code/*
front_processing/src/Interaction_examples/Hands_2D/code/*
front_processing/src/Smoke_manipulation/code/*
+front_processing/src/*/application.windows/lib/*
+front_processing/src/*/application.windows/*
+front_processing/src/Interaction_examples/*/application.windows/lib/*
+front_processing/src/Interaction_examples/*/application.windows/*
+middleware/dist/dotNetFx40_Client_x86_x64.exe
--- a/LICENSE_FRONT.txt Thu Mar 22 16:00:17 2012 +0100
+++ b/LICENSE_FRONT.txt Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2012, IRI (Institute d Recherche de d'Innovation)
+Copyright (c) 2012, IRI (Institute d Recherche de d'Innovation)
All rights reserved.
http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html
@@ -9,151 +9,151 @@
Avertissement
Ce contrat est une licence de logiciel libre issue d'une concertation
-entre ses auteurs afin que le respect de deux grands principes préside à
-sa rédaction:
+entre ses auteurs afin que le respect de deux grands principes préside Ã
+sa rédaction:
* d'une part, le respect des principes de diffusion des logiciels
- libres: accès au code source, droits étendus conférés aux
+ libres: accès au code source, droits étendus conférés aux
utilisateurs,
- * d'autre part, la désignation d'un droit applicable, le droit
- français, auquel elle est conforme, tant au regard du droit de la
- responsabilité civile que du droit de la propriété intellectuelle
+ * d'autre part, la désignation d'un droit applicable, le droit
+ français, auquel elle est conforme, tant au regard du droit de la
+ responsabilité civile que du droit de la propriété intellectuelle
et de la protection qu'il offre aux auteurs et titulaires des
droits patrimoniaux sur un logiciel.
Les auteurs de la licence CeCILL-B (pour Ce[a] C[nrs] I[nria] L[ogiciel]
L[ibre]) sont:
-Commissariat à l'Energie Atomique - CEA, établissement public de
-recherche à caractère scientifique, technique et industriel, dont le
-siège est situé 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris.
+Commissariat à l'Energie Atomique - CEA, établissement public de
+recherche à caractère scientifique, technique et industriel, dont le
+siège est situé 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris.
-Centre National de la Recherche Scientifique - CNRS, établissement
-public à caractère scientifique et technologique, dont le siège est
-situé 3 rue Michel-Ange, 75794 Paris cedex 16.
+Centre National de la Recherche Scientifique - CNRS, établissement
+public à caractère scientifique et technologique, dont le siège est
+situé 3 rue Michel-Ange, 75794 Paris cedex 16.
Institut National de Recherche en Informatique et en Automatique -
-INRIA, établissement public à caractère scientifique et technologique,
-dont le siège est situé Domaine de Voluceau, Rocquencourt, BP 105, 78153
+INRIA, établissement public à caractère scientifique et technologique,
+dont le siège est situé Domaine de Voluceau, Rocquencourt, BP 105, 78153
Le Chesnay cedex.
- Préambule
+ Préambule
Ce contrat est une licence de logiciel libre dont l'objectif est de
-conférer aux utilisateurs une très large liberté de modification et de
-redistribution du logiciel régi par cette licence.
+conférer aux utilisateurs une très large liberté de modification et de
+redistribution du logiciel régi par cette licence.
-L'exercice de cette liberté est assorti d'une obligation forte de
-citation à la charge de ceux qui distribueraient un logiciel incorporant
-un logiciel régi par la présente licence afin d'assurer que les
-contributions de tous soient correctement identifiées et reconnues.
+L'exercice de cette liberté est assorti d'une obligation forte de
+citation à la charge de ceux qui distribueraient un logiciel incorporant
+un logiciel régi par la présente licence afin d'assurer que les
+contributions de tous soient correctement identifiées et reconnues.
-L'accessibilité au code source et les droits de copie, de modification
-et de redistribution qui découlent de ce contrat ont pour contrepartie
-de n'offrir aux utilisateurs qu'une garantie limitée et de ne faire
+L'accessibilité au code source et les droits de copie, de modification
+et de redistribution qui découlent de ce contrat ont pour contrepartie
+de n'offrir aux utilisateurs qu'une garantie limitée et de ne faire
peser sur l'auteur du logiciel, le titulaire des droits patrimoniaux et
-les concédants successifs qu'une responsabilité restreinte.
+les concédants successifs qu'une responsabilité restreinte.
-A cet égard l'attention de l'utilisateur est attirée sur les risques
-associés au chargement, à l'utilisation, à la modification et/ou au
-développement et à la reproduction du logiciel par l'utilisateur étant
-donné sa spécificité de logiciel libre, qui peut le rendre complexe à
-manipuler et qui le réserve donc à des développeurs ou des
-professionnels avertis possédant des connaissances informatiques
-approfondies. Les utilisateurs sont donc invités à charger et tester
-l'adéquation du logiciel à leurs besoins dans des conditions permettant
-d'assurer la sécurité de leurs systèmes et/ou de leurs données et, plus
-généralement, à l'utiliser et l'exploiter dans les mêmes conditions de
-sécurité. Ce contrat peut être reproduit et diffusé librement, sous
-réserve de le conserver en l'état, sans ajout ni suppression de clauses.
+A cet égard l'attention de l'utilisateur est attirée sur les risques
+associés au chargement, à l'utilisation, à la modification et/ou au
+développement et à la reproduction du logiciel par l'utilisateur étant
+donné sa spécificité de logiciel libre, qui peut le rendre complexe Ã
+manipuler et qui le réserve donc à des développeurs ou des
+professionnels avertis possédant des connaissances informatiques
+approfondies. Les utilisateurs sont donc invités à charger et tester
+l'adéquation du logiciel à leurs besoins dans des conditions permettant
+d'assurer la sécurité de leurs systèmes et/ou de leurs données et, plus
+généralement, à l'utiliser et l'exploiter dans les mêmes conditions de
+sécurité. Ce contrat peut être reproduit et diffusé librement, sous
+réserve de le conserver en l'état, sans ajout ni suppression de clauses.
-Ce contrat est susceptible de s'appliquer à tout logiciel dont le
-titulaire des droits patrimoniaux décide de soumettre l'exploitation aux
+Ce contrat est susceptible de s'appliquer à tout logiciel dont le
+titulaire des droits patrimoniaux décide de soumettre l'exploitation aux
dispositions qu'il contient.
Article 1 - DEFINITIONS
-Dans ce contrat, les termes suivants, lorsqu'ils seront écrits avec une
+Dans ce contrat, les termes suivants, lorsqu'ils seront écrits avec une
lettre capitale, auront la signification suivante:
-Contrat: désigne le présent contrat de licence, ses éventuelles versions
-postérieures et annexes.
+Contrat: désigne le présent contrat de licence, ses éventuelles versions
+postérieures et annexes.
-Logiciel: désigne le logiciel sous sa forme de Code Objet et/ou de Code
-Source et le cas échéant sa documentation, dans leur état au moment de
-l'acceptation du Contrat par le Licencié.
+Logiciel: désigne le logiciel sous sa forme de Code Objet et/ou de Code
+Source et le cas échéant sa documentation, dans leur état au moment de
+l'acceptation du Contrat par le Licencié.
-Logiciel Initial: désigne le Logiciel sous sa forme de Code Source et
-éventuellement de Code Objet et le cas échéant sa documentation, dans
-leur état au moment de leur première diffusion sous les termes du Contrat.
+Logiciel Initial: désigne le Logiciel sous sa forme de Code Source et
+éventuellement de Code Objet et le cas échéant sa documentation, dans
+leur état au moment de leur première diffusion sous les termes du Contrat.
-Logiciel Modifié: désigne le Logiciel modifié par au moins une
+Logiciel Modifié: désigne le Logiciel modifié par au moins une
Contribution.
-Code Source: désigne l'ensemble des instructions et des lignes de
-programme du Logiciel et auquel l'accès est nécessaire en vue de
+Code Source: désigne l'ensemble des instructions et des lignes de
+programme du Logiciel et auquel l'accès est nécessaire en vue de
modifier le Logiciel.
-Code Objet: désigne les fichiers binaires issus de la compilation du
+Code Objet: désigne les fichiers binaires issus de la compilation du
Code Source.
-Titulaire: désigne le ou les détenteurs des droits patrimoniaux d'auteur
+Titulaire: désigne le ou les détenteurs des droits patrimoniaux d'auteur
sur le Logiciel Initial.
-Licencié: désigne le ou les utilisateurs du Logiciel ayant accepté le
+Licencié: désigne le ou les utilisateurs du Logiciel ayant accepté le
Contrat.
-Contributeur: désigne le Licencié auteur d'au moins une Contribution.
+Contributeur: désigne le Licencié auteur d'au moins une Contribution.
-Concédant: désigne le Titulaire ou toute personne physique ou morale
+Concédant: désigne le Titulaire ou toute personne physique ou morale
distribuant le Logiciel sous le Contrat.
-Contribution: désigne l'ensemble des modifications, corrections,
-traductions, adaptations et/ou nouvelles fonctionnalités intégrées dans
+Contribution: désigne l'ensemble des modifications, corrections,
+traductions, adaptations et/ou nouvelles fonctionnalités intégrées dans
le Logiciel par tout Contributeur, ainsi que tout Module Interne.
-Module: désigne un ensemble de fichiers sources y compris leur
-documentation qui permet de réaliser des fonctionnalités ou services
-supplémentaires à ceux fournis par le Logiciel.
+Module: désigne un ensemble de fichiers sources y compris leur
+documentation qui permet de réaliser des fonctionnalités ou services
+supplémentaires à ceux fournis par le Logiciel.
-Module Externe: désigne tout Module, non dérivé du Logiciel, tel que ce
-Module et le Logiciel s'exécutent dans des espaces d'adressage
-différents, l'un appelant l'autre au moment de leur exécution.
+Module Externe: désigne tout Module, non dérivé du Logiciel, tel que ce
+Module et le Logiciel s'exécutent dans des espaces d'adressage
+différents, l'un appelant l'autre au moment de leur exécution.
-Module Interne: désigne tout Module lié au Logiciel de telle sorte
-qu'ils s'exécutent dans le même espace d'adressage.
+Module Interne: désigne tout Module lié au Logiciel de telle sorte
+qu'ils s'exécutent dans le même espace d'adressage.
-Parties: désigne collectivement le Licencié et le Concédant.
+Parties: désigne collectivement le Licencié et le Concédant.
Ces termes s'entendent au singulier comme au pluriel.
Article 2 - OBJET
-Le Contrat a pour objet la concession par le Concédant au Licencié d'une
+Le Contrat a pour objet la concession par le Concédant au Licencié d'une
licence non exclusive, cessible et mondiale du Logiciel telle que
-définie ci-après à l'article 5 pour toute la durée de protection des droits
+définie ci-après à l'article 5 pour toute la durée de protection des droits
portant sur ce Logiciel.
Article 3 - ACCEPTATION
-3.1 L'acceptation par le Licencié des termes du Contrat est réputée
+3.1 L'acceptation par le Licencié des termes du Contrat est réputée
acquise du fait du premier des faits suivants:
* (i) le chargement du Logiciel par tout moyen notamment par
- téléchargement à partir d'un serveur distant ou par chargement à
+ téléchargement à partir d'un serveur distant ou par chargement Ã
partir d'un support physique;
- * (ii) le premier exercice par le Licencié de l'un quelconque des
- droits concédés par le Contrat.
+ * (ii) le premier exercice par le Licencié de l'un quelconque des
+ droits concédés par le Contrat.
3.2 Un exemplaire du Contrat, contenant notamment un avertissement
-relatif aux spécificités du Logiciel, à la restriction de garantie et à
-la limitation à un usage par des utilisateurs expérimentés a été mis à
-disposition du Licencié préalablement à son acceptation telle que
-définie à l'article 3.1 ci dessus et le Licencié reconnaît en avoir pris
+relatif aux spécificités du Logiciel, à la restriction de garantie et Ã
+la limitation à un usage par des utilisateurs expérimentés a été mis Ã
+disposition du Licencié préalablement à son acceptation telle que
+définie à l'article 3.1 ci dessus et le Licencié reconnaît en avoir pris
connaissance.
@@ -162,47 +162,47 @@
4.1 ENTREE EN VIGUEUR
-Le Contrat entre en vigueur à la date de son acceptation par le Licencié
-telle que définie en 3.1.
+Le Contrat entre en vigueur à la date de son acceptation par le Licencié
+telle que définie en 3.1.
4.2 DUREE
-Le Contrat produira ses effets pendant toute la durée légale de
+Le Contrat produira ses effets pendant toute la durée légale de
protection des droits patrimoniaux portant sur le Logiciel.
Article 5 - ETENDUE DES DROITS CONCEDES
-Le Concédant concède au Licencié, qui accepte, les droits suivants sur
-le Logiciel pour toutes destinations et pour la durée du Contrat dans
-les conditions ci-après détaillées.
+Le Concédant concède au Licencié, qui accepte, les droits suivants sur
+le Logiciel pour toutes destinations et pour la durée du Contrat dans
+les conditions ci-après détaillées.
-Par ailleurs, si le Concédant détient ou venait à détenir un ou
-plusieurs brevets d'invention protégeant tout ou partie des
-fonctionnalités du Logiciel ou de ses composants, il s'engage à ne pas
-opposer les éventuels droits conférés par ces brevets aux Licenciés
+Par ailleurs, si le Concédant détient ou venait à détenir un ou
+plusieurs brevets d'invention protégeant tout ou partie des
+fonctionnalités du Logiciel ou de ses composants, il s'engage à ne pas
+opposer les éventuels droits conférés par ces brevets aux Licenciés
successifs qui utiliseraient, exploiteraient ou modifieraient le
-Logiciel. En cas de cession de ces brevets, le Concédant s'engage à
-faire reprendre les obligations du présent alinéa aux cessionnaires.
+Logiciel. En cas de cession de ces brevets, le Concédant s'engage Ã
+faire reprendre les obligations du présent alinéa aux cessionnaires.
5.1 DROIT D'UTILISATION
-Le Licencié est autorisé à utiliser le Logiciel, sans restriction quant
-aux domaines d'application, étant ci-après précisé que cela comporte:
+Le Licencié est autorisé à utiliser le Logiciel, sans restriction quant
+aux domaines d'application, étant ci-après précisé que cela comporte:
1. la reproduction permanente ou provisoire du Logiciel en tout ou
partie par tout moyen et sous toute forme.
- 2. le chargement, l'affichage, l'exécution, ou le stockage du
+ 2. le chargement, l'affichage, l'exécution, ou le stockage du
Logiciel sur tout support.
- 3. la possibilité d'en observer, d'en étudier, ou d'en tester le
- fonctionnement afin de déterminer les idées et principes qui sont
- à la base de n'importe quel élément de ce Logiciel; et ceci,
- lorsque le Licencié effectue toute opération de chargement,
- d'affichage, d'exécution, de transmission ou de stockage du
+ 3. la possibilité d'en observer, d'en étudier, ou d'en tester le
+ fonctionnement afin de déterminer les idées et principes qui sont
+ à la base de n'importe quel élément de ce Logiciel; et ceci,
+ lorsque le Licencié effectue toute opération de chargement,
+ d'affichage, d'exécution, de transmission ou de stockage du
Logiciel qu'il est en droit d'effectuer en vertu du Contrat.
@@ -210,96 +210,96 @@
Le droit d'apporter des Contributions comporte le droit de traduire,
d'adapter, d'arranger ou d'apporter toute autre modification au Logiciel
-et le droit de reproduire le logiciel en résultant.
+et le droit de reproduire le logiciel en résultant.
-Le Licencié est autorisé à apporter toute Contribution au Logiciel sous
-réserve de mentionner, de façon explicite, son nom en tant qu'auteur de
-cette Contribution et la date de création de celle-ci.
+Le Licencié est autorisé à apporter toute Contribution au Logiciel sous
+réserve de mentionner, de façon explicite, son nom en tant qu'auteur de
+cette Contribution et la date de création de celle-ci.
5.3 DROIT DE DISTRIBUTION
Le droit de distribution comporte notamment le droit de diffuser, de
transmettre et de communiquer le Logiciel au public sur tout support et
-par tout moyen ainsi que le droit de mettre sur le marché à titre
-onéreux ou gratuit, un ou des exemplaires du Logiciel par tout procédé.
+par tout moyen ainsi que le droit de mettre sur le marché à titre
+onéreux ou gratuit, un ou des exemplaires du Logiciel par tout procédé.
-Le Licencié est autorisé à distribuer des copies du Logiciel, modifié ou
-non, à des tiers dans les conditions ci-après détaillées.
+Le Licencié est autorisé à distribuer des copies du Logiciel, modifié ou
+non, à des tiers dans les conditions ci-après détaillées.
5.3.1 DISTRIBUTION DU LOGICIEL SANS MODIFICATION
-Le Licencié est autorisé à distribuer des copies conformes du Logiciel,
-sous forme de Code Source ou de Code Objet, à condition que cette
-distribution respecte les dispositions du Contrat dans leur totalité et
-soit accompagnée:
+Le Licencié est autorisé à distribuer des copies conformes du Logiciel,
+sous forme de Code Source ou de Code Objet, Ã condition que cette
+distribution respecte les dispositions du Contrat dans leur totalité et
+soit accompagnée:
1. d'un exemplaire du Contrat,
- 2. d'un avertissement relatif à la restriction de garantie et de
- responsabilité du Concédant telle que prévue aux articles 8
+ 2. d'un avertissement relatif à la restriction de garantie et de
+ responsabilité du Concédant telle que prévue aux articles 8
et 9,
-et que, dans le cas où seul le Code Objet du Logiciel est redistribué,
-le Licencié permette un accès effectif au Code Source complet du
-Logiciel pendant au moins toute la durée de sa distribution du Logiciel,
-étant entendu que le coût additionnel d'acquisition du Code Source ne
-devra pas excéder le simple coût de transfert des données.
+et que, dans le cas où seul le Code Objet du Logiciel est redistribué,
+le Licencié permette un accès effectif au Code Source complet du
+Logiciel pendant au moins toute la durée de sa distribution du Logiciel,
+étant entendu que le coût additionnel d'acquisition du Code Source ne
+devra pas excéder le simple coût de transfert des données.
5.3.2 DISTRIBUTION DU LOGICIEL MODIFIE
-Lorsque le Licencié apporte une Contribution au Logiciel, le Logiciel
-Modifié peut être distribué sous un contrat de licence autre que le
-présent Contrat sous réserve du respect des dispositions de l'article
+Lorsque le Licencié apporte une Contribution au Logiciel, le Logiciel
+Modifié peut être distribué sous un contrat de licence autre que le
+présent Contrat sous réserve du respect des dispositions de l'article
5.3.4.
5.3.3 DISTRIBUTION DES MODULES EXTERNES
-Lorsque le Licencié a développé un Module Externe les conditions du
-Contrat ne s'appliquent pas à ce Module Externe, qui peut être distribué
-sous un contrat de licence différent.
+Lorsque le Licencié a développé un Module Externe les conditions du
+Contrat ne s'appliquent pas à ce Module Externe, qui peut être distribué
+sous un contrat de licence différent.
5.3.4 CITATIONS
-Le Licencié qui distribue un Logiciel Modifié s'engage expressément:
+Le Licencié qui distribue un Logiciel Modifié s'engage expressément:
- 1. à indiquer dans sa documentation qu'il a été réalisé à partir du
- Logiciel régi par le Contrat, en reproduisant les mentions de
- propriété intellectuelle du Logiciel,
+ 1. à indiquer dans sa documentation qu'il a été réalisé à partir du
+ Logiciel régi par le Contrat, en reproduisant les mentions de
+ propriété intellectuelle du Logiciel,
- 2. à faire en sorte que l'utilisation du Logiciel, ses mentions de
- propriété intellectuelle et le fait qu'il est régi par le Contrat
- soient indiqués dans un texte facilement accessible depuis
- l'interface du Logiciel Modifié,
+ 2. Ã faire en sorte que l'utilisation du Logiciel, ses mentions de
+ propriété intellectuelle et le fait qu'il est régi par le Contrat
+ soient indiqués dans un texte facilement accessible depuis
+ l'interface du Logiciel Modifié,
- 3. à mentionner, sur un site Web librement accessible décrivant le
- Logiciel Modifié, et pendant au moins toute la durée de sa
- distribution, qu'il a été réalisé à partir du Logiciel régi par le
- Contrat, en reproduisant les mentions de propriété intellectuelle
+ 3. à mentionner, sur un site Web librement accessible décrivant le
+ Logiciel Modifié, et pendant au moins toute la durée de sa
+ distribution, qu'il a été réalisé à partir du Logiciel régi par le
+ Contrat, en reproduisant les mentions de propriété intellectuelle
du Logiciel,
- 4. lorsqu'il le distribue à un tiers susceptible de distribuer
- lui-même un Logiciel Modifié, sans avoir à en distribuer le code
- source, à faire ses meilleurs efforts pour que les obligations du
- présent article 5.3.4 soient reprises par le dit tiers.
+ 4. lorsqu'il le distribue à un tiers susceptible de distribuer
+ lui-même un Logiciel Modifié, sans avoir à en distribuer le code
+ source, Ã faire ses meilleurs efforts pour que les obligations du
+ présent article 5.3.4 soient reprises par le dit tiers.
-Lorsque le Logiciel modifié ou non est distribué avec un Module Externe
-qui a été conçu pour l'utiliser, le Licencié doit soumettre le dit
-Module Externe aux obligations précédentes.
+Lorsque le Logiciel modifié ou non est distribué avec un Module Externe
+qui a été conçu pour l'utiliser, le Licencié doit soumettre le dit
+Module Externe aux obligations précédentes.
5.3.5 COMPATIBILITE AVEC LES LICENCES CeCILL et CeCILL-C
-Lorsqu'un Logiciel Modifié contient une Contribution soumise au contrat
-de licence CeCILL, les stipulations prévues à l'article 5.3.4 sont
+Lorsqu'un Logiciel Modifié contient une Contribution soumise au contrat
+de licence CeCILL, les stipulations prévues à l'article 5.3.4 sont
facultatives.
-Un Logiciel Modifié peut être distribué sous le contrat de licence
-CeCILL-C. Les stipulations prévues à l'article 5.3.4 sont alors
+Un Logiciel Modifié peut être distribué sous le contrat de licence
+CeCILL-C. Les stipulations prévues à l'article 5.3.4 sont alors
facultatives.
@@ -308,146 +308,146 @@
6.1 SUR LE LOGICIEL INITIAL
-Le Titulaire est détenteur des droits patrimoniaux sur le Logiciel
+Le Titulaire est détenteur des droits patrimoniaux sur le Logiciel
Initial. Toute utilisation du Logiciel Initial est soumise au respect
des conditions dans lesquelles le Titulaire a choisi de diffuser son
-oeuvre et nul autre n'a la faculté de modifier les conditions de
+oeuvre et nul autre n'a la faculté de modifier les conditions de
diffusion de ce Logiciel Initial.
-Le Titulaire s'engage à ce que le Logiciel Initial reste au moins régi
-par le Contrat et ce, pour la durée visée à l'article 4.2.
+Le Titulaire s'engage à ce que le Logiciel Initial reste au moins régi
+par le Contrat et ce, pour la durée visée à l'article 4.2.
6.2 SUR LES CONTRIBUTIONS
-Le Licencié qui a développé une Contribution est titulaire sur celle-ci
-des droits de propriété intellectuelle dans les conditions définies par
-la législation applicable.
+Le Licencié qui a développé une Contribution est titulaire sur celle-ci
+des droits de propriété intellectuelle dans les conditions définies par
+la législation applicable.
6.3 SUR LES MODULES EXTERNES
-Le Licencié qui a développé un Module Externe est titulaire sur celui-ci
-des droits de propriété intellectuelle dans les conditions définies par
-la législation applicable et reste libre du choix du contrat régissant
+Le Licencié qui a développé un Module Externe est titulaire sur celui-ci
+des droits de propriété intellectuelle dans les conditions définies par
+la législation applicable et reste libre du choix du contrat régissant
sa diffusion.
6.4 DISPOSITIONS COMMUNES
-Le Licencié s'engage expressément:
+Le Licencié s'engage expressément:
- 1. à ne pas supprimer ou modifier de quelque manière que ce soit les
- mentions de propriété intellectuelle apposées sur le Logiciel;
+ 1. à ne pas supprimer ou modifier de quelque manière que ce soit les
+ mentions de propriété intellectuelle apposées sur le Logiciel;
- 2. à reproduire à l'identique lesdites mentions de propriété
- intellectuelle sur les copies du Logiciel modifié ou non.
+ 2. à reproduire à l'identique lesdites mentions de propriété
+ intellectuelle sur les copies du Logiciel modifié ou non.
-Le Licencié s'engage à ne pas porter atteinte, directement ou
-indirectement, aux droits de propriété intellectuelle du Titulaire et/ou
-des Contributeurs sur le Logiciel et à prendre, le cas échéant, à
-l'égard de son personnel toutes les mesures nécessaires pour assurer le
-respect des dits droits de propriété intellectuelle du Titulaire et/ou
+Le Licencié s'engage à ne pas porter atteinte, directement ou
+indirectement, aux droits de propriété intellectuelle du Titulaire et/ou
+des Contributeurs sur le Logiciel et à prendre, le cas échéant, Ã
+l'égard de son personnel toutes les mesures nécessaires pour assurer le
+respect des dits droits de propriété intellectuelle du Titulaire et/ou
des Contributeurs.
Article 7 - SERVICES ASSOCIES
-7.1 Le Contrat n'oblige en aucun cas le Concédant à la réalisation de
+7.1 Le Contrat n'oblige en aucun cas le Concédant à la réalisation de
prestations d'assistance technique ou de maintenance du Logiciel.
-Cependant le Concédant reste libre de proposer ce type de services. Les
+Cependant le Concédant reste libre de proposer ce type de services. Les
termes et conditions d'une telle assistance technique et/ou d'une telle
-maintenance seront alors déterminés dans un acte séparé. Ces actes de
+maintenance seront alors déterminés dans un acte séparé. Ces actes de
maintenance et/ou assistance technique n'engageront que la seule
-responsabilité du Concédant qui les propose.
+responsabilité du Concédant qui les propose.
-7.2 De même, tout Concédant est libre de proposer, sous sa seule
-responsabilité, à ses licenciés une garantie, qui n'engagera que lui,
-lors de la redistribution du Logiciel et/ou du Logiciel Modifié et ce,
-dans les conditions qu'il souhaite. Cette garantie et les modalités
-financières de son application feront l'objet d'un acte séparé entre le
-Concédant et le Licencié.
+7.2 De même, tout Concédant est libre de proposer, sous sa seule
+responsabilité, à ses licenciés une garantie, qui n'engagera que lui,
+lors de la redistribution du Logiciel et/ou du Logiciel Modifié et ce,
+dans les conditions qu'il souhaite. Cette garantie et les modalités
+financières de son application feront l'objet d'un acte séparé entre le
+Concédant et le Licencié.
Article 8 - RESPONSABILITE
-8.1 Sous réserve des dispositions de l'article 8.2, le Licencié a la
-faculté, sous réserve de prouver la faute du Concédant concerné, de
-solliciter la réparation du préjudice direct qu'il subirait du fait du
+8.1 Sous réserve des dispositions de l'article 8.2, le Licencié a la
+faculté, sous réserve de prouver la faute du Concédant concerné, de
+solliciter la réparation du préjudice direct qu'il subirait du fait du
Logiciel et dont il apportera la preuve.
-8.2 La responsabilité du Concédant est limitée aux engagements pris en
-application du Contrat et ne saurait être engagée en raison notamment:
-(i) des dommages dus à l'inexécution, totale ou partielle, de ses
-obligations par le Licencié, (ii) des dommages directs ou indirects
-découlant de l'utilisation ou des performances du Logiciel subis par le
-Licencié et (iii) plus généralement d'un quelconque dommage indirect. En
-particulier, les Parties conviennent expressément que tout préjudice
-financier ou commercial (par exemple perte de données, perte de
-bénéfices, perte d'exploitation, perte de clientèle ou de commandes,
-manque à gagner, trouble commercial quelconque) ou toute action dirigée
-contre le Licencié par un tiers, constitue un dommage indirect et
-n'ouvre pas droit à réparation par le Concédant.
+8.2 La responsabilité du Concédant est limitée aux engagements pris en
+application du Contrat et ne saurait être engagée en raison notamment:
+(i) des dommages dus à l'inexécution, totale ou partielle, de ses
+obligations par le Licencié, (ii) des dommages directs ou indirects
+découlant de l'utilisation ou des performances du Logiciel subis par le
+Licencié et (iii) plus généralement d'un quelconque dommage indirect. En
+particulier, les Parties conviennent expressément que tout préjudice
+financier ou commercial (par exemple perte de données, perte de
+bénéfices, perte d'exploitation, perte de clientèle ou de commandes,
+manque à gagner, trouble commercial quelconque) ou toute action dirigée
+contre le Licencié par un tiers, constitue un dommage indirect et
+n'ouvre pas droit à réparation par le Concédant.
Article 9 - GARANTIE
-9.1 Le Licencié reconnaît que l'état actuel des connaissances
+9.1 Le Licencié reconnaît que l'état actuel des connaissances
scientifiques et techniques au moment de la mise en circulation du
-Logiciel ne permet pas d'en tester et d'en vérifier toutes les
-utilisations ni de détecter l'existence d'éventuels défauts. L'attention
-du Licencié a été attirée sur ce point sur les risques associés au
-chargement, à l'utilisation, la modification et/ou au développement et à
-la reproduction du Logiciel qui sont réservés à des utilisateurs avertis.
+Logiciel ne permet pas d'en tester et d'en vérifier toutes les
+utilisations ni de détecter l'existence d'éventuels défauts. L'attention
+du Licencié a été attirée sur ce point sur les risques associés au
+chargement, à l'utilisation, la modification et/ou au développement et Ã
+la reproduction du Logiciel qui sont réservés à des utilisateurs avertis.
-Il relève de la responsabilité du Licencié de contrôler, par tous
-moyens, l'adéquation du produit à ses besoins, son bon fonctionnement et
+Il relève de la responsabilité du Licencié de contrôler, par tous
+moyens, l'adéquation du produit à ses besoins, son bon fonctionnement et
de s'assurer qu'il ne causera pas de dommages aux personnes et aux biens.
-9.2 Le Concédant déclare de bonne foi être en droit de concéder
-l'ensemble des droits attachés au Logiciel (comprenant notamment les
-droits visés à l'article 5).
+9.2 Le Concédant déclare de bonne foi être en droit de concéder
+l'ensemble des droits attachés au Logiciel (comprenant notamment les
+droits visés à l'article 5).
-9.3 Le Licencié reconnaît que le Logiciel est fourni "en l'état" par le
-Concédant sans autre garantie, expresse ou tacite, que celle prévue à
+9.3 Le Licencié reconnaît que le Logiciel est fourni "en l'état" par le
+Concédant sans autre garantie, expresse ou tacite, que celle prévue Ã
l'article 9.2 et notamment sans aucune garantie sur sa valeur commerciale,
-son caractère sécurisé, innovant ou pertinent.
+son caractère sécurisé, innovant ou pertinent.
-En particulier, le Concédant ne garantit pas que le Logiciel est exempt
+En particulier, le Concédant ne garantit pas que le Logiciel est exempt
d'erreur, qu'il fonctionnera sans interruption, qu'il sera compatible
-avec l'équipement du Licencié et sa configuration logicielle ni qu'il
-remplira les besoins du Licencié.
+avec l'équipement du Licencié et sa configuration logicielle ni qu'il
+remplira les besoins du Licencié.
-9.4 Le Concédant ne garantit pas, de manière expresse ou tacite, que le
-Logiciel ne porte pas atteinte à un quelconque droit de propriété
+9.4 Le Concédant ne garantit pas, de manière expresse ou tacite, que le
+Logiciel ne porte pas atteinte à un quelconque droit de propriété
intellectuelle d'un tiers portant sur un brevet, un logiciel ou sur tout
-autre droit de propriété. Ainsi, le Concédant exclut toute garantie au
-profit du Licencié contre les actions en contrefaçon qui pourraient être
-diligentées au titre de l'utilisation, de la modification, et de la
-redistribution du Logiciel. Néanmoins, si de telles actions sont
-exercées contre le Licencié, le Concédant lui apportera son aide
-technique et juridique pour sa défense. Cette aide technique et
-juridique est déterminée au cas par cas entre le Concédant concerné et
-le Licencié dans le cadre d'un protocole d'accord. Le Concédant dégage
-toute responsabilité quant à l'utilisation de la dénomination du
-Logiciel par le Licencié. Aucune garantie n'est apportée quant à
-l'existence de droits antérieurs sur le nom du Logiciel et sur
+autre droit de propriété. Ainsi, le Concédant exclut toute garantie au
+profit du Licencié contre les actions en contrefaçon qui pourraient être
+diligentées au titre de l'utilisation, de la modification, et de la
+redistribution du Logiciel. Néanmoins, si de telles actions sont
+exercées contre le Licencié, le Concédant lui apportera son aide
+technique et juridique pour sa défense. Cette aide technique et
+juridique est déterminée au cas par cas entre le Concédant concerné et
+le Licencié dans le cadre d'un protocole d'accord. Le Concédant dégage
+toute responsabilité quant à l'utilisation de la dénomination du
+Logiciel par le Licencié. Aucune garantie n'est apportée quant Ã
+l'existence de droits antérieurs sur le nom du Logiciel et sur
l'existence d'une marque.
Article 10 - RESILIATION
-10.1 En cas de manquement par le Licencié aux obligations mises à sa
-charge par le Contrat, le Concédant pourra résilier de plein droit le
-Contrat trente (30) jours après notification adressée au Licencié et
-restée sans effet.
+10.1 En cas de manquement par le Licencié aux obligations mises à sa
+charge par le Contrat, le Concédant pourra résilier de plein droit le
+Contrat trente (30) jours après notification adressée au Licencié et
+restée sans effet.
-10.2 Le Licencié dont le Contrat est résilié n'est plus autorisé à
+10.2 Le Licencié dont le Contrat est résilié n'est plus autorisé Ã
utiliser, modifier ou distribuer le Logiciel. Cependant, toutes les
-licences qu'il aura concédées antérieurement à la résiliation du Contrat
-resteront valides sous réserve qu'elles aient été effectuées en
-conformité avec le Contrat.
+licences qu'il aura concédées antérieurement à la résiliation du Contrat
+resteront valides sous réserve qu'elles aient été effectuées en
+conformité avec le Contrat.
Article 11 - DISPOSITIONS DIVERSES
@@ -455,69 +455,69 @@
11.1 CAUSE EXTERIEURE
-Aucune des Parties ne sera responsable d'un retard ou d'une défaillance
-d'exécution du Contrat qui serait dû à un cas de force majeure, un cas
-fortuit ou une cause extérieure, telle que, notamment, le mauvais
-fonctionnement ou les interruptions du réseau électrique ou de
-télécommunication, la paralysie du réseau liée à une attaque
-informatique, l'intervention des autorités gouvernementales, les
-catastrophes naturelles, les dégâts des eaux, les tremblements de terre,
-le feu, les explosions, les grèves et les conflits sociaux, l'état de
+Aucune des Parties ne sera responsable d'un retard ou d'une défaillance
+d'exécution du Contrat qui serait dû à un cas de force majeure, un cas
+fortuit ou une cause extérieure, telle que, notamment, le mauvais
+fonctionnement ou les interruptions du réseau électrique ou de
+télécommunication, la paralysie du réseau liée à une attaque
+informatique, l'intervention des autorités gouvernementales, les
+catastrophes naturelles, les dégâts des eaux, les tremblements de terre,
+le feu, les explosions, les grèves et les conflits sociaux, l'état de
guerre...
11.2 Le fait, par l'une ou l'autre des Parties, d'omettre en une ou
-plusieurs occasions de se prévaloir d'une ou plusieurs dispositions du
+plusieurs occasions de se prévaloir d'une ou plusieurs dispositions du
Contrat, ne pourra en aucun cas impliquer renonciation par la Partie
-intéressée à s'en prévaloir ultérieurement.
+intéressée à s'en prévaloir ultérieurement.
-11.3 Le Contrat annule et remplace toute convention antérieure, écrite
-ou orale, entre les Parties sur le même objet et constitue l'accord
+11.3 Le Contrat annule et remplace toute convention antérieure, écrite
+ou orale, entre les Parties sur le même objet et constitue l'accord
entier entre les Parties sur cet objet. Aucune addition ou modification
-aux termes du Contrat n'aura d'effet à l'égard des Parties à moins
-d'être faite par écrit et signée par leurs représentants dûment habilités.
+aux termes du Contrat n'aura d'effet à l'égard des Parties à moins
+d'être faite par écrit et signée par leurs représentants dûment habilités.
-11.4 Dans l'hypothèse où une ou plusieurs des dispositions du Contrat
-s'avèrerait contraire à une loi ou à un texte applicable, existants ou
-futurs, cette loi ou ce texte prévaudrait, et les Parties feraient les
-amendements nécessaires pour se conformer à cette loi ou à ce texte.
-Toutes les autres dispositions resteront en vigueur. De même, la
-nullité, pour quelque raison que ce soit, d'une des dispositions du
-Contrat ne saurait entraîner la nullité de l'ensemble du Contrat.
+11.4 Dans l'hypothèse où une ou plusieurs des dispositions du Contrat
+s'avèrerait contraire à une loi ou à un texte applicable, existants ou
+futurs, cette loi ou ce texte prévaudrait, et les Parties feraient les
+amendements nécessaires pour se conformer à cette loi ou à ce texte.
+Toutes les autres dispositions resteront en vigueur. De même, la
+nullité, pour quelque raison que ce soit, d'une des dispositions du
+Contrat ne saurait entraîner la nullité de l'ensemble du Contrat.
11.5 LANGUE
-Le Contrat est rédigé en langue française et en langue anglaise, ces
-deux versions faisant également foi.
+Le Contrat est rédigé en langue française et en langue anglaise, ces
+deux versions faisant également foi.
Article 12 - NOUVELLES VERSIONS DU CONTRAT
-12.1 Toute personne est autorisée à copier et distribuer des copies de
+12.1 Toute personne est autorisée à copier et distribuer des copies de
ce Contrat.
-12.2 Afin d'en préserver la cohérence, le texte du Contrat est protégé
-et ne peut être modifié que par les auteurs de la licence, lesquels se
-réservent le droit de publier périodiquement des mises à jour ou de
-nouvelles versions du Contrat, qui posséderont chacune un numéro
-distinct. Ces versions ultérieures seront susceptibles de prendre en
-compte de nouvelles problématiques rencontrées par les logiciels libres.
+12.2 Afin d'en préserver la cohérence, le texte du Contrat est protégé
+et ne peut être modifié que par les auteurs de la licence, lesquels se
+réservent le droit de publier périodiquement des mises à jour ou de
+nouvelles versions du Contrat, qui posséderont chacune un numéro
+distinct. Ces versions ultérieures seront susceptibles de prendre en
+compte de nouvelles problématiques rencontrées par les logiciels libres.
-12.3 Tout Logiciel diffusé sous une version donnée du Contrat ne pourra
-faire l'objet d'une diffusion ultérieure que sous la même version du
-Contrat ou une version postérieure.
+12.3 Tout Logiciel diffusé sous une version donnée du Contrat ne pourra
+faire l'objet d'une diffusion ultérieure que sous la même version du
+Contrat ou une version postérieure.
Article 13 - LOI APPLICABLE ET COMPETENCE TERRITORIALE
-13.1 Le Contrat est régi par la loi française. Les Parties conviennent
-de tenter de régler à l'amiable les différends ou litiges qui
-viendraient à se produire par suite ou à l'occasion du Contrat.
+13.1 Le Contrat est régi par la loi française. Les Parties conviennent
+de tenter de régler à l'amiable les différends ou litiges qui
+viendraient à se produire par suite ou à l'occasion du Contrat.
-13.2 A défaut d'accord amiable dans un délai de deux (2) mois à compter
-de leur survenance et sauf situation relevant d'une procédure d'urgence,
-les différends ou litiges seront portés par la Partie la plus diligente
-devant les Tribunaux compétents de Paris.
+13.2 A défaut d'accord amiable dans un délai de deux (2) mois à compter
+de leur survenance et sauf situation relevant d'une procédure d'urgence,
+les différends ou litiges seront portés par la Partie la plus diligente
+devant les Tribunaux compétents de Paris.
Version 1.0 du 2006-09-05.
@@ -544,7 +544,7 @@
The authors of the CeCILL-B (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
license are:
-Commissariat à l'Energie Atomique - CEA, a public scientific, technical
+Commissariat à l'Energie Atomique - CEA, a public scientific, technical
and industrial research establishment, having its principal place of
business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
@@ -861,7 +861,7 @@
The Licensee undertakes not to directly or indirectly infringe the
intellectual property rights of the Holder and/or Contributors on the
-Software and to take, where applicable, vis-à-vis its staff, any and all
+Software and to take, where applicable, vis-Ã -vis its staff, any and all
measures required to ensure respect of said intellectual property rights
of the Holder and/or Contributors.
--- a/LICENSE_MIDDLEWARE.txt Thu Mar 22 16:00:17 2012 +0100
+++ b/LICENSE_MIDDLEWARE.txt Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-Copyright (c) 2012, IRI (Institute d Recherche de d'Innovation)
+Copyright (c) 2012, IRI (Institute d Recherche de d'Innovation)
All rights reserved.
http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html
@@ -9,151 +9,151 @@
Avertissement
Ce contrat est une licence de logiciel libre issue d'une concertation
-entre ses auteurs afin que le respect de deux grands principes préside à
-sa rédaction:
+entre ses auteurs afin que le respect de deux grands principes préside Ã
+sa rédaction:
* d'une part, le respect des principes de diffusion des logiciels
- libres: accès au code source, droits étendus conférés aux
+ libres: accès au code source, droits étendus conférés aux
utilisateurs,
- * d'autre part, la désignation d'un droit applicable, le droit
- français, auquel elle est conforme, tant au regard du droit de la
- responsabilité civile que du droit de la propriété intellectuelle
+ * d'autre part, la désignation d'un droit applicable, le droit
+ français, auquel elle est conforme, tant au regard du droit de la
+ responsabilité civile que du droit de la propriété intellectuelle
et de la protection qu'il offre aux auteurs et titulaires des
droits patrimoniaux sur un logiciel.
Les auteurs de la licence CeCILL-B (pour Ce[a] C[nrs] I[nria] L[ogiciel]
L[ibre]) sont:
-Commissariat à l'Energie Atomique - CEA, établissement public de
-recherche à caractère scientifique, technique et industriel, dont le
-siège est situé 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris.
+Commissariat à l'Energie Atomique - CEA, établissement public de
+recherche à caractère scientifique, technique et industriel, dont le
+siège est situé 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris.
-Centre National de la Recherche Scientifique - CNRS, établissement
-public à caractère scientifique et technologique, dont le siège est
-situé 3 rue Michel-Ange, 75794 Paris cedex 16.
+Centre National de la Recherche Scientifique - CNRS, établissement
+public à caractère scientifique et technologique, dont le siège est
+situé 3 rue Michel-Ange, 75794 Paris cedex 16.
Institut National de Recherche en Informatique et en Automatique -
-INRIA, établissement public à caractère scientifique et technologique,
-dont le siège est situé Domaine de Voluceau, Rocquencourt, BP 105, 78153
+INRIA, établissement public à caractère scientifique et technologique,
+dont le siège est situé Domaine de Voluceau, Rocquencourt, BP 105, 78153
Le Chesnay cedex.
- Préambule
+ Préambule
Ce contrat est une licence de logiciel libre dont l'objectif est de
-conférer aux utilisateurs une très large liberté de modification et de
-redistribution du logiciel régi par cette licence.
+conférer aux utilisateurs une très large liberté de modification et de
+redistribution du logiciel régi par cette licence.
-L'exercice de cette liberté est assorti d'une obligation forte de
-citation à la charge de ceux qui distribueraient un logiciel incorporant
-un logiciel régi par la présente licence afin d'assurer que les
-contributions de tous soient correctement identifiées et reconnues.
+L'exercice de cette liberté est assorti d'une obligation forte de
+citation à la charge de ceux qui distribueraient un logiciel incorporant
+un logiciel régi par la présente licence afin d'assurer que les
+contributions de tous soient correctement identifiées et reconnues.
-L'accessibilité au code source et les droits de copie, de modification
-et de redistribution qui découlent de ce contrat ont pour contrepartie
-de n'offrir aux utilisateurs qu'une garantie limitée et de ne faire
+L'accessibilité au code source et les droits de copie, de modification
+et de redistribution qui découlent de ce contrat ont pour contrepartie
+de n'offrir aux utilisateurs qu'une garantie limitée et de ne faire
peser sur l'auteur du logiciel, le titulaire des droits patrimoniaux et
-les concédants successifs qu'une responsabilité restreinte.
+les concédants successifs qu'une responsabilité restreinte.
-A cet égard l'attention de l'utilisateur est attirée sur les risques
-associés au chargement, à l'utilisation, à la modification et/ou au
-développement et à la reproduction du logiciel par l'utilisateur étant
-donné sa spécificité de logiciel libre, qui peut le rendre complexe à
-manipuler et qui le réserve donc à des développeurs ou des
-professionnels avertis possédant des connaissances informatiques
-approfondies. Les utilisateurs sont donc invités à charger et tester
-l'adéquation du logiciel à leurs besoins dans des conditions permettant
-d'assurer la sécurité de leurs systèmes et/ou de leurs données et, plus
-généralement, à l'utiliser et l'exploiter dans les mêmes conditions de
-sécurité. Ce contrat peut être reproduit et diffusé librement, sous
-réserve de le conserver en l'état, sans ajout ni suppression de clauses.
+A cet égard l'attention de l'utilisateur est attirée sur les risques
+associés au chargement, à l'utilisation, à la modification et/ou au
+développement et à la reproduction du logiciel par l'utilisateur étant
+donné sa spécificité de logiciel libre, qui peut le rendre complexe Ã
+manipuler et qui le réserve donc à des développeurs ou des
+professionnels avertis possédant des connaissances informatiques
+approfondies. Les utilisateurs sont donc invités à charger et tester
+l'adéquation du logiciel à leurs besoins dans des conditions permettant
+d'assurer la sécurité de leurs systèmes et/ou de leurs données et, plus
+généralement, à l'utiliser et l'exploiter dans les mêmes conditions de
+sécurité. Ce contrat peut être reproduit et diffusé librement, sous
+réserve de le conserver en l'état, sans ajout ni suppression de clauses.
-Ce contrat est susceptible de s'appliquer à tout logiciel dont le
-titulaire des droits patrimoniaux décide de soumettre l'exploitation aux
+Ce contrat est susceptible de s'appliquer à tout logiciel dont le
+titulaire des droits patrimoniaux décide de soumettre l'exploitation aux
dispositions qu'il contient.
Article 1 - DEFINITIONS
-Dans ce contrat, les termes suivants, lorsqu'ils seront écrits avec une
+Dans ce contrat, les termes suivants, lorsqu'ils seront écrits avec une
lettre capitale, auront la signification suivante:
-Contrat: désigne le présent contrat de licence, ses éventuelles versions
-postérieures et annexes.
+Contrat: désigne le présent contrat de licence, ses éventuelles versions
+postérieures et annexes.
-Logiciel: désigne le logiciel sous sa forme de Code Objet et/ou de Code
-Source et le cas échéant sa documentation, dans leur état au moment de
-l'acceptation du Contrat par le Licencié.
+Logiciel: désigne le logiciel sous sa forme de Code Objet et/ou de Code
+Source et le cas échéant sa documentation, dans leur état au moment de
+l'acceptation du Contrat par le Licencié.
-Logiciel Initial: désigne le Logiciel sous sa forme de Code Source et
-éventuellement de Code Objet et le cas échéant sa documentation, dans
-leur état au moment de leur première diffusion sous les termes du Contrat.
+Logiciel Initial: désigne le Logiciel sous sa forme de Code Source et
+éventuellement de Code Objet et le cas échéant sa documentation, dans
+leur état au moment de leur première diffusion sous les termes du Contrat.
-Logiciel Modifié: désigne le Logiciel modifié par au moins une
+Logiciel Modifié: désigne le Logiciel modifié par au moins une
Contribution.
-Code Source: désigne l'ensemble des instructions et des lignes de
-programme du Logiciel et auquel l'accès est nécessaire en vue de
+Code Source: désigne l'ensemble des instructions et des lignes de
+programme du Logiciel et auquel l'accès est nécessaire en vue de
modifier le Logiciel.
-Code Objet: désigne les fichiers binaires issus de la compilation du
+Code Objet: désigne les fichiers binaires issus de la compilation du
Code Source.
-Titulaire: désigne le ou les détenteurs des droits patrimoniaux d'auteur
+Titulaire: désigne le ou les détenteurs des droits patrimoniaux d'auteur
sur le Logiciel Initial.
-Licencié: désigne le ou les utilisateurs du Logiciel ayant accepté le
+Licencié: désigne le ou les utilisateurs du Logiciel ayant accepté le
Contrat.
-Contributeur: désigne le Licencié auteur d'au moins une Contribution.
+Contributeur: désigne le Licencié auteur d'au moins une Contribution.
-Concédant: désigne le Titulaire ou toute personne physique ou morale
+Concédant: désigne le Titulaire ou toute personne physique ou morale
distribuant le Logiciel sous le Contrat.
-Contribution: désigne l'ensemble des modifications, corrections,
-traductions, adaptations et/ou nouvelles fonctionnalités intégrées dans
+Contribution: désigne l'ensemble des modifications, corrections,
+traductions, adaptations et/ou nouvelles fonctionnalités intégrées dans
le Logiciel par tout Contributeur, ainsi que tout Module Interne.
-Module: désigne un ensemble de fichiers sources y compris leur
-documentation qui permet de réaliser des fonctionnalités ou services
-supplémentaires à ceux fournis par le Logiciel.
+Module: désigne un ensemble de fichiers sources y compris leur
+documentation qui permet de réaliser des fonctionnalités ou services
+supplémentaires à ceux fournis par le Logiciel.
-Module Externe: désigne tout Module, non dérivé du Logiciel, tel que ce
-Module et le Logiciel s'exécutent dans des espaces d'adressage
-différents, l'un appelant l'autre au moment de leur exécution.
+Module Externe: désigne tout Module, non dérivé du Logiciel, tel que ce
+Module et le Logiciel s'exécutent dans des espaces d'adressage
+différents, l'un appelant l'autre au moment de leur exécution.
-Module Interne: désigne tout Module lié au Logiciel de telle sorte
-qu'ils s'exécutent dans le même espace d'adressage.
+Module Interne: désigne tout Module lié au Logiciel de telle sorte
+qu'ils s'exécutent dans le même espace d'adressage.
-Parties: désigne collectivement le Licencié et le Concédant.
+Parties: désigne collectivement le Licencié et le Concédant.
Ces termes s'entendent au singulier comme au pluriel.
Article 2 - OBJET
-Le Contrat a pour objet la concession par le Concédant au Licencié d'une
+Le Contrat a pour objet la concession par le Concédant au Licencié d'une
licence non exclusive, cessible et mondiale du Logiciel telle que
-définie ci-après à l'article 5 pour toute la durée de protection des droits
+définie ci-après à l'article 5 pour toute la durée de protection des droits
portant sur ce Logiciel.
Article 3 - ACCEPTATION
-3.1 L'acceptation par le Licencié des termes du Contrat est réputée
+3.1 L'acceptation par le Licencié des termes du Contrat est réputée
acquise du fait du premier des faits suivants:
* (i) le chargement du Logiciel par tout moyen notamment par
- téléchargement à partir d'un serveur distant ou par chargement à
+ téléchargement à partir d'un serveur distant ou par chargement Ã
partir d'un support physique;
- * (ii) le premier exercice par le Licencié de l'un quelconque des
- droits concédés par le Contrat.
+ * (ii) le premier exercice par le Licencié de l'un quelconque des
+ droits concédés par le Contrat.
3.2 Un exemplaire du Contrat, contenant notamment un avertissement
-relatif aux spécificités du Logiciel, à la restriction de garantie et à
-la limitation à un usage par des utilisateurs expérimentés a été mis à
-disposition du Licencié préalablement à son acceptation telle que
-définie à l'article 3.1 ci dessus et le Licencié reconnaît en avoir pris
+relatif aux spécificités du Logiciel, à la restriction de garantie et Ã
+la limitation à un usage par des utilisateurs expérimentés a été mis Ã
+disposition du Licencié préalablement à son acceptation telle que
+définie à l'article 3.1 ci dessus et le Licencié reconnaît en avoir pris
connaissance.
@@ -162,47 +162,47 @@
4.1 ENTREE EN VIGUEUR
-Le Contrat entre en vigueur à la date de son acceptation par le Licencié
-telle que définie en 3.1.
+Le Contrat entre en vigueur à la date de son acceptation par le Licencié
+telle que définie en 3.1.
4.2 DUREE
-Le Contrat produira ses effets pendant toute la durée légale de
+Le Contrat produira ses effets pendant toute la durée légale de
protection des droits patrimoniaux portant sur le Logiciel.
Article 5 - ETENDUE DES DROITS CONCEDES
-Le Concédant concède au Licencié, qui accepte, les droits suivants sur
-le Logiciel pour toutes destinations et pour la durée du Contrat dans
-les conditions ci-après détaillées.
+Le Concédant concède au Licencié, qui accepte, les droits suivants sur
+le Logiciel pour toutes destinations et pour la durée du Contrat dans
+les conditions ci-après détaillées.
-Par ailleurs, si le Concédant détient ou venait à détenir un ou
-plusieurs brevets d'invention protégeant tout ou partie des
-fonctionnalités du Logiciel ou de ses composants, il s'engage à ne pas
-opposer les éventuels droits conférés par ces brevets aux Licenciés
+Par ailleurs, si le Concédant détient ou venait à détenir un ou
+plusieurs brevets d'invention protégeant tout ou partie des
+fonctionnalités du Logiciel ou de ses composants, il s'engage à ne pas
+opposer les éventuels droits conférés par ces brevets aux Licenciés
successifs qui utiliseraient, exploiteraient ou modifieraient le
-Logiciel. En cas de cession de ces brevets, le Concédant s'engage à
-faire reprendre les obligations du présent alinéa aux cessionnaires.
+Logiciel. En cas de cession de ces brevets, le Concédant s'engage Ã
+faire reprendre les obligations du présent alinéa aux cessionnaires.
5.1 DROIT D'UTILISATION
-Le Licencié est autorisé à utiliser le Logiciel, sans restriction quant
-aux domaines d'application, étant ci-après précisé que cela comporte:
+Le Licencié est autorisé à utiliser le Logiciel, sans restriction quant
+aux domaines d'application, étant ci-après précisé que cela comporte:
1. la reproduction permanente ou provisoire du Logiciel en tout ou
partie par tout moyen et sous toute forme.
- 2. le chargement, l'affichage, l'exécution, ou le stockage du
+ 2. le chargement, l'affichage, l'exécution, ou le stockage du
Logiciel sur tout support.
- 3. la possibilité d'en observer, d'en étudier, ou d'en tester le
- fonctionnement afin de déterminer les idées et principes qui sont
- à la base de n'importe quel élément de ce Logiciel; et ceci,
- lorsque le Licencié effectue toute opération de chargement,
- d'affichage, d'exécution, de transmission ou de stockage du
+ 3. la possibilité d'en observer, d'en étudier, ou d'en tester le
+ fonctionnement afin de déterminer les idées et principes qui sont
+ à la base de n'importe quel élément de ce Logiciel; et ceci,
+ lorsque le Licencié effectue toute opération de chargement,
+ d'affichage, d'exécution, de transmission ou de stockage du
Logiciel qu'il est en droit d'effectuer en vertu du Contrat.
@@ -210,96 +210,96 @@
Le droit d'apporter des Contributions comporte le droit de traduire,
d'adapter, d'arranger ou d'apporter toute autre modification au Logiciel
-et le droit de reproduire le logiciel en résultant.
+et le droit de reproduire le logiciel en résultant.
-Le Licencié est autorisé à apporter toute Contribution au Logiciel sous
-réserve de mentionner, de façon explicite, son nom en tant qu'auteur de
-cette Contribution et la date de création de celle-ci.
+Le Licencié est autorisé à apporter toute Contribution au Logiciel sous
+réserve de mentionner, de façon explicite, son nom en tant qu'auteur de
+cette Contribution et la date de création de celle-ci.
5.3 DROIT DE DISTRIBUTION
Le droit de distribution comporte notamment le droit de diffuser, de
transmettre et de communiquer le Logiciel au public sur tout support et
-par tout moyen ainsi que le droit de mettre sur le marché à titre
-onéreux ou gratuit, un ou des exemplaires du Logiciel par tout procédé.
+par tout moyen ainsi que le droit de mettre sur le marché à titre
+onéreux ou gratuit, un ou des exemplaires du Logiciel par tout procédé.
-Le Licencié est autorisé à distribuer des copies du Logiciel, modifié ou
-non, à des tiers dans les conditions ci-après détaillées.
+Le Licencié est autorisé à distribuer des copies du Logiciel, modifié ou
+non, à des tiers dans les conditions ci-après détaillées.
5.3.1 DISTRIBUTION DU LOGICIEL SANS MODIFICATION
-Le Licencié est autorisé à distribuer des copies conformes du Logiciel,
-sous forme de Code Source ou de Code Objet, à condition que cette
-distribution respecte les dispositions du Contrat dans leur totalité et
-soit accompagnée:
+Le Licencié est autorisé à distribuer des copies conformes du Logiciel,
+sous forme de Code Source ou de Code Objet, Ã condition que cette
+distribution respecte les dispositions du Contrat dans leur totalité et
+soit accompagnée:
1. d'un exemplaire du Contrat,
- 2. d'un avertissement relatif à la restriction de garantie et de
- responsabilité du Concédant telle que prévue aux articles 8
+ 2. d'un avertissement relatif à la restriction de garantie et de
+ responsabilité du Concédant telle que prévue aux articles 8
et 9,
-et que, dans le cas où seul le Code Objet du Logiciel est redistribué,
-le Licencié permette un accès effectif au Code Source complet du
-Logiciel pendant au moins toute la durée de sa distribution du Logiciel,
-étant entendu que le coût additionnel d'acquisition du Code Source ne
-devra pas excéder le simple coût de transfert des données.
+et que, dans le cas où seul le Code Objet du Logiciel est redistribué,
+le Licencié permette un accès effectif au Code Source complet du
+Logiciel pendant au moins toute la durée de sa distribution du Logiciel,
+étant entendu que le coût additionnel d'acquisition du Code Source ne
+devra pas excéder le simple coût de transfert des données.
5.3.2 DISTRIBUTION DU LOGICIEL MODIFIE
-Lorsque le Licencié apporte une Contribution au Logiciel, le Logiciel
-Modifié peut être distribué sous un contrat de licence autre que le
-présent Contrat sous réserve du respect des dispositions de l'article
+Lorsque le Licencié apporte une Contribution au Logiciel, le Logiciel
+Modifié peut être distribué sous un contrat de licence autre que le
+présent Contrat sous réserve du respect des dispositions de l'article
5.3.4.
5.3.3 DISTRIBUTION DES MODULES EXTERNES
-Lorsque le Licencié a développé un Module Externe les conditions du
-Contrat ne s'appliquent pas à ce Module Externe, qui peut être distribué
-sous un contrat de licence différent.
+Lorsque le Licencié a développé un Module Externe les conditions du
+Contrat ne s'appliquent pas à ce Module Externe, qui peut être distribué
+sous un contrat de licence différent.
5.3.4 CITATIONS
-Le Licencié qui distribue un Logiciel Modifié s'engage expressément:
+Le Licencié qui distribue un Logiciel Modifié s'engage expressément:
- 1. à indiquer dans sa documentation qu'il a été réalisé à partir du
- Logiciel régi par le Contrat, en reproduisant les mentions de
- propriété intellectuelle du Logiciel,
+ 1. à indiquer dans sa documentation qu'il a été réalisé à partir du
+ Logiciel régi par le Contrat, en reproduisant les mentions de
+ propriété intellectuelle du Logiciel,
- 2. à faire en sorte que l'utilisation du Logiciel, ses mentions de
- propriété intellectuelle et le fait qu'il est régi par le Contrat
- soient indiqués dans un texte facilement accessible depuis
- l'interface du Logiciel Modifié,
+ 2. Ã faire en sorte que l'utilisation du Logiciel, ses mentions de
+ propriété intellectuelle et le fait qu'il est régi par le Contrat
+ soient indiqués dans un texte facilement accessible depuis
+ l'interface du Logiciel Modifié,
- 3. à mentionner, sur un site Web librement accessible décrivant le
- Logiciel Modifié, et pendant au moins toute la durée de sa
- distribution, qu'il a été réalisé à partir du Logiciel régi par le
- Contrat, en reproduisant les mentions de propriété intellectuelle
+ 3. à mentionner, sur un site Web librement accessible décrivant le
+ Logiciel Modifié, et pendant au moins toute la durée de sa
+ distribution, qu'il a été réalisé à partir du Logiciel régi par le
+ Contrat, en reproduisant les mentions de propriété intellectuelle
du Logiciel,
- 4. lorsqu'il le distribue à un tiers susceptible de distribuer
- lui-même un Logiciel Modifié, sans avoir à en distribuer le code
- source, à faire ses meilleurs efforts pour que les obligations du
- présent article 5.3.4 soient reprises par le dit tiers.
+ 4. lorsqu'il le distribue à un tiers susceptible de distribuer
+ lui-même un Logiciel Modifié, sans avoir à en distribuer le code
+ source, Ã faire ses meilleurs efforts pour que les obligations du
+ présent article 5.3.4 soient reprises par le dit tiers.
-Lorsque le Logiciel modifié ou non est distribué avec un Module Externe
-qui a été conçu pour l'utiliser, le Licencié doit soumettre le dit
-Module Externe aux obligations précédentes.
+Lorsque le Logiciel modifié ou non est distribué avec un Module Externe
+qui a été conçu pour l'utiliser, le Licencié doit soumettre le dit
+Module Externe aux obligations précédentes.
5.3.5 COMPATIBILITE AVEC LES LICENCES CeCILL et CeCILL-C
-Lorsqu'un Logiciel Modifié contient une Contribution soumise au contrat
-de licence CeCILL, les stipulations prévues à l'article 5.3.4 sont
+Lorsqu'un Logiciel Modifié contient une Contribution soumise au contrat
+de licence CeCILL, les stipulations prévues à l'article 5.3.4 sont
facultatives.
-Un Logiciel Modifié peut être distribué sous le contrat de licence
-CeCILL-C. Les stipulations prévues à l'article 5.3.4 sont alors
+Un Logiciel Modifié peut être distribué sous le contrat de licence
+CeCILL-C. Les stipulations prévues à l'article 5.3.4 sont alors
facultatives.
@@ -308,146 +308,146 @@
6.1 SUR LE LOGICIEL INITIAL
-Le Titulaire est détenteur des droits patrimoniaux sur le Logiciel
+Le Titulaire est détenteur des droits patrimoniaux sur le Logiciel
Initial. Toute utilisation du Logiciel Initial est soumise au respect
des conditions dans lesquelles le Titulaire a choisi de diffuser son
-oeuvre et nul autre n'a la faculté de modifier les conditions de
+oeuvre et nul autre n'a la faculté de modifier les conditions de
diffusion de ce Logiciel Initial.
-Le Titulaire s'engage à ce que le Logiciel Initial reste au moins régi
-par le Contrat et ce, pour la durée visée à l'article 4.2.
+Le Titulaire s'engage à ce que le Logiciel Initial reste au moins régi
+par le Contrat et ce, pour la durée visée à l'article 4.2.
6.2 SUR LES CONTRIBUTIONS
-Le Licencié qui a développé une Contribution est titulaire sur celle-ci
-des droits de propriété intellectuelle dans les conditions définies par
-la législation applicable.
+Le Licencié qui a développé une Contribution est titulaire sur celle-ci
+des droits de propriété intellectuelle dans les conditions définies par
+la législation applicable.
6.3 SUR LES MODULES EXTERNES
-Le Licencié qui a développé un Module Externe est titulaire sur celui-ci
-des droits de propriété intellectuelle dans les conditions définies par
-la législation applicable et reste libre du choix du contrat régissant
+Le Licencié qui a développé un Module Externe est titulaire sur celui-ci
+des droits de propriété intellectuelle dans les conditions définies par
+la législation applicable et reste libre du choix du contrat régissant
sa diffusion.
6.4 DISPOSITIONS COMMUNES
-Le Licencié s'engage expressément:
+Le Licencié s'engage expressément:
- 1. à ne pas supprimer ou modifier de quelque manière que ce soit les
- mentions de propriété intellectuelle apposées sur le Logiciel;
+ 1. à ne pas supprimer ou modifier de quelque manière que ce soit les
+ mentions de propriété intellectuelle apposées sur le Logiciel;
- 2. à reproduire à l'identique lesdites mentions de propriété
- intellectuelle sur les copies du Logiciel modifié ou non.
+ 2. à reproduire à l'identique lesdites mentions de propriété
+ intellectuelle sur les copies du Logiciel modifié ou non.
-Le Licencié s'engage à ne pas porter atteinte, directement ou
-indirectement, aux droits de propriété intellectuelle du Titulaire et/ou
-des Contributeurs sur le Logiciel et à prendre, le cas échéant, à
-l'égard de son personnel toutes les mesures nécessaires pour assurer le
-respect des dits droits de propriété intellectuelle du Titulaire et/ou
+Le Licencié s'engage à ne pas porter atteinte, directement ou
+indirectement, aux droits de propriété intellectuelle du Titulaire et/ou
+des Contributeurs sur le Logiciel et à prendre, le cas échéant, Ã
+l'égard de son personnel toutes les mesures nécessaires pour assurer le
+respect des dits droits de propriété intellectuelle du Titulaire et/ou
des Contributeurs.
Article 7 - SERVICES ASSOCIES
-7.1 Le Contrat n'oblige en aucun cas le Concédant à la réalisation de
+7.1 Le Contrat n'oblige en aucun cas le Concédant à la réalisation de
prestations d'assistance technique ou de maintenance du Logiciel.
-Cependant le Concédant reste libre de proposer ce type de services. Les
+Cependant le Concédant reste libre de proposer ce type de services. Les
termes et conditions d'une telle assistance technique et/ou d'une telle
-maintenance seront alors déterminés dans un acte séparé. Ces actes de
+maintenance seront alors déterminés dans un acte séparé. Ces actes de
maintenance et/ou assistance technique n'engageront que la seule
-responsabilité du Concédant qui les propose.
+responsabilité du Concédant qui les propose.
-7.2 De même, tout Concédant est libre de proposer, sous sa seule
-responsabilité, à ses licenciés une garantie, qui n'engagera que lui,
-lors de la redistribution du Logiciel et/ou du Logiciel Modifié et ce,
-dans les conditions qu'il souhaite. Cette garantie et les modalités
-financières de son application feront l'objet d'un acte séparé entre le
-Concédant et le Licencié.
+7.2 De même, tout Concédant est libre de proposer, sous sa seule
+responsabilité, à ses licenciés une garantie, qui n'engagera que lui,
+lors de la redistribution du Logiciel et/ou du Logiciel Modifié et ce,
+dans les conditions qu'il souhaite. Cette garantie et les modalités
+financières de son application feront l'objet d'un acte séparé entre le
+Concédant et le Licencié.
Article 8 - RESPONSABILITE
-8.1 Sous réserve des dispositions de l'article 8.2, le Licencié a la
-faculté, sous réserve de prouver la faute du Concédant concerné, de
-solliciter la réparation du préjudice direct qu'il subirait du fait du
+8.1 Sous réserve des dispositions de l'article 8.2, le Licencié a la
+faculté, sous réserve de prouver la faute du Concédant concerné, de
+solliciter la réparation du préjudice direct qu'il subirait du fait du
Logiciel et dont il apportera la preuve.
-8.2 La responsabilité du Concédant est limitée aux engagements pris en
-application du Contrat et ne saurait être engagée en raison notamment:
-(i) des dommages dus à l'inexécution, totale ou partielle, de ses
-obligations par le Licencié, (ii) des dommages directs ou indirects
-découlant de l'utilisation ou des performances du Logiciel subis par le
-Licencié et (iii) plus généralement d'un quelconque dommage indirect. En
-particulier, les Parties conviennent expressément que tout préjudice
-financier ou commercial (par exemple perte de données, perte de
-bénéfices, perte d'exploitation, perte de clientèle ou de commandes,
-manque à gagner, trouble commercial quelconque) ou toute action dirigée
-contre le Licencié par un tiers, constitue un dommage indirect et
-n'ouvre pas droit à réparation par le Concédant.
+8.2 La responsabilité du Concédant est limitée aux engagements pris en
+application du Contrat et ne saurait être engagée en raison notamment:
+(i) des dommages dus à l'inexécution, totale ou partielle, de ses
+obligations par le Licencié, (ii) des dommages directs ou indirects
+découlant de l'utilisation ou des performances du Logiciel subis par le
+Licencié et (iii) plus généralement d'un quelconque dommage indirect. En
+particulier, les Parties conviennent expressément que tout préjudice
+financier ou commercial (par exemple perte de données, perte de
+bénéfices, perte d'exploitation, perte de clientèle ou de commandes,
+manque à gagner, trouble commercial quelconque) ou toute action dirigée
+contre le Licencié par un tiers, constitue un dommage indirect et
+n'ouvre pas droit à réparation par le Concédant.
Article 9 - GARANTIE
-9.1 Le Licencié reconnaît que l'état actuel des connaissances
+9.1 Le Licencié reconnaît que l'état actuel des connaissances
scientifiques et techniques au moment de la mise en circulation du
-Logiciel ne permet pas d'en tester et d'en vérifier toutes les
-utilisations ni de détecter l'existence d'éventuels défauts. L'attention
-du Licencié a été attirée sur ce point sur les risques associés au
-chargement, à l'utilisation, la modification et/ou au développement et à
-la reproduction du Logiciel qui sont réservés à des utilisateurs avertis.
+Logiciel ne permet pas d'en tester et d'en vérifier toutes les
+utilisations ni de détecter l'existence d'éventuels défauts. L'attention
+du Licencié a été attirée sur ce point sur les risques associés au
+chargement, à l'utilisation, la modification et/ou au développement et Ã
+la reproduction du Logiciel qui sont réservés à des utilisateurs avertis.
-Il relève de la responsabilité du Licencié de contrôler, par tous
-moyens, l'adéquation du produit à ses besoins, son bon fonctionnement et
+Il relève de la responsabilité du Licencié de contrôler, par tous
+moyens, l'adéquation du produit à ses besoins, son bon fonctionnement et
de s'assurer qu'il ne causera pas de dommages aux personnes et aux biens.
-9.2 Le Concédant déclare de bonne foi être en droit de concéder
-l'ensemble des droits attachés au Logiciel (comprenant notamment les
-droits visés à l'article 5).
+9.2 Le Concédant déclare de bonne foi être en droit de concéder
+l'ensemble des droits attachés au Logiciel (comprenant notamment les
+droits visés à l'article 5).
-9.3 Le Licencié reconnaît que le Logiciel est fourni "en l'état" par le
-Concédant sans autre garantie, expresse ou tacite, que celle prévue à
+9.3 Le Licencié reconnaît que le Logiciel est fourni "en l'état" par le
+Concédant sans autre garantie, expresse ou tacite, que celle prévue Ã
l'article 9.2 et notamment sans aucune garantie sur sa valeur commerciale,
-son caractère sécurisé, innovant ou pertinent.
+son caractère sécurisé, innovant ou pertinent.
-En particulier, le Concédant ne garantit pas que le Logiciel est exempt
+En particulier, le Concédant ne garantit pas que le Logiciel est exempt
d'erreur, qu'il fonctionnera sans interruption, qu'il sera compatible
-avec l'équipement du Licencié et sa configuration logicielle ni qu'il
-remplira les besoins du Licencié.
+avec l'équipement du Licencié et sa configuration logicielle ni qu'il
+remplira les besoins du Licencié.
-9.4 Le Concédant ne garantit pas, de manière expresse ou tacite, que le
-Logiciel ne porte pas atteinte à un quelconque droit de propriété
+9.4 Le Concédant ne garantit pas, de manière expresse ou tacite, que le
+Logiciel ne porte pas atteinte à un quelconque droit de propriété
intellectuelle d'un tiers portant sur un brevet, un logiciel ou sur tout
-autre droit de propriété. Ainsi, le Concédant exclut toute garantie au
-profit du Licencié contre les actions en contrefaçon qui pourraient être
-diligentées au titre de l'utilisation, de la modification, et de la
-redistribution du Logiciel. Néanmoins, si de telles actions sont
-exercées contre le Licencié, le Concédant lui apportera son aide
-technique et juridique pour sa défense. Cette aide technique et
-juridique est déterminée au cas par cas entre le Concédant concerné et
-le Licencié dans le cadre d'un protocole d'accord. Le Concédant dégage
-toute responsabilité quant à l'utilisation de la dénomination du
-Logiciel par le Licencié. Aucune garantie n'est apportée quant à
-l'existence de droits antérieurs sur le nom du Logiciel et sur
+autre droit de propriété. Ainsi, le Concédant exclut toute garantie au
+profit du Licencié contre les actions en contrefaçon qui pourraient être
+diligentées au titre de l'utilisation, de la modification, et de la
+redistribution du Logiciel. Néanmoins, si de telles actions sont
+exercées contre le Licencié, le Concédant lui apportera son aide
+technique et juridique pour sa défense. Cette aide technique et
+juridique est déterminée au cas par cas entre le Concédant concerné et
+le Licencié dans le cadre d'un protocole d'accord. Le Concédant dégage
+toute responsabilité quant à l'utilisation de la dénomination du
+Logiciel par le Licencié. Aucune garantie n'est apportée quant Ã
+l'existence de droits antérieurs sur le nom du Logiciel et sur
l'existence d'une marque.
Article 10 - RESILIATION
-10.1 En cas de manquement par le Licencié aux obligations mises à sa
-charge par le Contrat, le Concédant pourra résilier de plein droit le
-Contrat trente (30) jours après notification adressée au Licencié et
-restée sans effet.
+10.1 En cas de manquement par le Licencié aux obligations mises à sa
+charge par le Contrat, le Concédant pourra résilier de plein droit le
+Contrat trente (30) jours après notification adressée au Licencié et
+restée sans effet.
-10.2 Le Licencié dont le Contrat est résilié n'est plus autorisé à
+10.2 Le Licencié dont le Contrat est résilié n'est plus autorisé Ã
utiliser, modifier ou distribuer le Logiciel. Cependant, toutes les
-licences qu'il aura concédées antérieurement à la résiliation du Contrat
-resteront valides sous réserve qu'elles aient été effectuées en
-conformité avec le Contrat.
+licences qu'il aura concédées antérieurement à la résiliation du Contrat
+resteront valides sous réserve qu'elles aient été effectuées en
+conformité avec le Contrat.
Article 11 - DISPOSITIONS DIVERSES
@@ -455,69 +455,69 @@
11.1 CAUSE EXTERIEURE
-Aucune des Parties ne sera responsable d'un retard ou d'une défaillance
-d'exécution du Contrat qui serait dû à un cas de force majeure, un cas
-fortuit ou une cause extérieure, telle que, notamment, le mauvais
-fonctionnement ou les interruptions du réseau électrique ou de
-télécommunication, la paralysie du réseau liée à une attaque
-informatique, l'intervention des autorités gouvernementales, les
-catastrophes naturelles, les dégâts des eaux, les tremblements de terre,
-le feu, les explosions, les grèves et les conflits sociaux, l'état de
+Aucune des Parties ne sera responsable d'un retard ou d'une défaillance
+d'exécution du Contrat qui serait dû à un cas de force majeure, un cas
+fortuit ou une cause extérieure, telle que, notamment, le mauvais
+fonctionnement ou les interruptions du réseau électrique ou de
+télécommunication, la paralysie du réseau liée à une attaque
+informatique, l'intervention des autorités gouvernementales, les
+catastrophes naturelles, les dégâts des eaux, les tremblements de terre,
+le feu, les explosions, les grèves et les conflits sociaux, l'état de
guerre...
11.2 Le fait, par l'une ou l'autre des Parties, d'omettre en une ou
-plusieurs occasions de se prévaloir d'une ou plusieurs dispositions du
+plusieurs occasions de se prévaloir d'une ou plusieurs dispositions du
Contrat, ne pourra en aucun cas impliquer renonciation par la Partie
-intéressée à s'en prévaloir ultérieurement.
+intéressée à s'en prévaloir ultérieurement.
-11.3 Le Contrat annule et remplace toute convention antérieure, écrite
-ou orale, entre les Parties sur le même objet et constitue l'accord
+11.3 Le Contrat annule et remplace toute convention antérieure, écrite
+ou orale, entre les Parties sur le même objet et constitue l'accord
entier entre les Parties sur cet objet. Aucune addition ou modification
-aux termes du Contrat n'aura d'effet à l'égard des Parties à moins
-d'être faite par écrit et signée par leurs représentants dûment habilités.
+aux termes du Contrat n'aura d'effet à l'égard des Parties à moins
+d'être faite par écrit et signée par leurs représentants dûment habilités.
-11.4 Dans l'hypothèse où une ou plusieurs des dispositions du Contrat
-s'avèrerait contraire à une loi ou à un texte applicable, existants ou
-futurs, cette loi ou ce texte prévaudrait, et les Parties feraient les
-amendements nécessaires pour se conformer à cette loi ou à ce texte.
-Toutes les autres dispositions resteront en vigueur. De même, la
-nullité, pour quelque raison que ce soit, d'une des dispositions du
-Contrat ne saurait entraîner la nullité de l'ensemble du Contrat.
+11.4 Dans l'hypothèse où une ou plusieurs des dispositions du Contrat
+s'avèrerait contraire à une loi ou à un texte applicable, existants ou
+futurs, cette loi ou ce texte prévaudrait, et les Parties feraient les
+amendements nécessaires pour se conformer à cette loi ou à ce texte.
+Toutes les autres dispositions resteront en vigueur. De même, la
+nullité, pour quelque raison que ce soit, d'une des dispositions du
+Contrat ne saurait entraîner la nullité de l'ensemble du Contrat.
11.5 LANGUE
-Le Contrat est rédigé en langue française et en langue anglaise, ces
-deux versions faisant également foi.
+Le Contrat est rédigé en langue française et en langue anglaise, ces
+deux versions faisant également foi.
Article 12 - NOUVELLES VERSIONS DU CONTRAT
-12.1 Toute personne est autorisée à copier et distribuer des copies de
+12.1 Toute personne est autorisée à copier et distribuer des copies de
ce Contrat.
-12.2 Afin d'en préserver la cohérence, le texte du Contrat est protégé
-et ne peut être modifié que par les auteurs de la licence, lesquels se
-réservent le droit de publier périodiquement des mises à jour ou de
-nouvelles versions du Contrat, qui posséderont chacune un numéro
-distinct. Ces versions ultérieures seront susceptibles de prendre en
-compte de nouvelles problématiques rencontrées par les logiciels libres.
+12.2 Afin d'en préserver la cohérence, le texte du Contrat est protégé
+et ne peut être modifié que par les auteurs de la licence, lesquels se
+réservent le droit de publier périodiquement des mises à jour ou de
+nouvelles versions du Contrat, qui posséderont chacune un numéro
+distinct. Ces versions ultérieures seront susceptibles de prendre en
+compte de nouvelles problématiques rencontrées par les logiciels libres.
-12.3 Tout Logiciel diffusé sous une version donnée du Contrat ne pourra
-faire l'objet d'une diffusion ultérieure que sous la même version du
-Contrat ou une version postérieure.
+12.3 Tout Logiciel diffusé sous une version donnée du Contrat ne pourra
+faire l'objet d'une diffusion ultérieure que sous la même version du
+Contrat ou une version postérieure.
Article 13 - LOI APPLICABLE ET COMPETENCE TERRITORIALE
-13.1 Le Contrat est régi par la loi française. Les Parties conviennent
-de tenter de régler à l'amiable les différends ou litiges qui
-viendraient à se produire par suite ou à l'occasion du Contrat.
+13.1 Le Contrat est régi par la loi française. Les Parties conviennent
+de tenter de régler à l'amiable les différends ou litiges qui
+viendraient à se produire par suite ou à l'occasion du Contrat.
-13.2 A défaut d'accord amiable dans un délai de deux (2) mois à compter
-de leur survenance et sauf situation relevant d'une procédure d'urgence,
-les différends ou litiges seront portés par la Partie la plus diligente
-devant les Tribunaux compétents de Paris.
+13.2 A défaut d'accord amiable dans un délai de deux (2) mois à compter
+de leur survenance et sauf situation relevant d'une procédure d'urgence,
+les différends ou litiges seront portés par la Partie la plus diligente
+devant les Tribunaux compétents de Paris.
Version 1.0 du 2006-09-05.
@@ -544,7 +544,7 @@
The authors of the CeCILL-B (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
license are:
-Commissariat à l'Energie Atomique - CEA, a public scientific, technical
+Commissariat à l'Energie Atomique - CEA, a public scientific, technical
and industrial research establishment, having its principal place of
business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
@@ -861,7 +861,7 @@
The Licensee undertakes not to directly or indirectly infringe the
intellectual property rights of the Holder and/or Contributors on the
-Software and to take, where applicable, vis-à-vis its staff, any and all
+Software and to take, where applicable, vis-Ã -vis its staff, any and all
measures required to ensure respect of said intellectual property rights
of the Holder and/or Contributors.
--- a/front_processing/doc/readme.txt Thu Mar 22 16:00:17 2012 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-TraKERS (Tracking using Kinect and Extracting Robust Skeletons) est une interface basée sur la détection de gestures / positions du squelette envoyé par le SDK Microsoft (1.0) de Kinect.
-
-Auteur : Alexandre BASTIEN.
-
-I) TraKERS - Eléments requis :
-
-Dans cette partie, il vous faudra installer Processing, disponible ici : http://processing.org/download/
-
-II) TraKERS - Structure :
-
-Dans le Front, se trouvent deux exécutables "Trakers" et "Trakers_gestures", respectivement pour le tracé de courbes via les coordonnées des positions des mains récupérées du Middleware et pour l'affichage des gestes détectés. Il aurait été possible de les rassembler en un programme, mais pour des raisons de clarté lors de l'utilisation, j'ai préféré procéder ainsi.
-
-III) TraKERS - Utilisation :
-
-Si le Middleware est lancé, le programme de Front lancé fait office de client, et récupère les notifications envoyées. Détaillons les deux programmes :
-
-A) Trakers
-Comme indiqué plus haut, il reçoit et affiche les coordonnées des mains entrant dans le champ délimité par le Middleware.
-Afin d'indiquer les limites de zone de dessin, un masque noir a été appliqué, et se met à jour.
-Les notifications du client s'affichent en blanc en haut du masque, et indique si une ou deux mains sont détectées.
-Lorsque l'on dessine, une série d'ellipses apparaissent à l'écran, formant des courbes.
-Lorsque deux mains sont détectées, la gauche est rouge et l'autre verte.
-Si une main et une seule est détectée, la courbe sera rouge.
-Si la ou les mains s'approchent et atteignent une certaine proximité, le segment dessiné deviendra bleu à partir de ce moment-là.
-
-B) Trakers_gestures
-Le même masque a été appliqué dans ce programme d'affichage de notifications de gestes indiqués par le Middleware.
-Le programme indique simplement dans la partie supérieure du masque s'il détecte ou non une gesture, et s'il en détecte une, donne le code envoyé par le Middleware.
-
-IV) Fonctionnement :
-
-Les programmes sont découpés en fonctions, afin de rendre leur structure plus cohérente.
-
-Il existe deux fonctions principales sous Processing.
-void setup(), qui permet d'initialiser des variables, la taille de la fenêtre, etc.
-void draw(), qui est raffraichie constamment et sert principalement à dessiner ou faire appel aux fonctions amenées à être appelées toutes les N ms.
-Il est bien entendu possible de dessiner via des fonctions déjà implémentées et prêtes à l'emploi, dont la documentation se trouve ici :
-
-http://processing.org/reference/
-
-Ils reçoivent des messages OSC de la part du Middleware. Ceux-ci sont contenus dans des objets qui sont des TuioCursors (en 3D) pour gérer la position des mains et des TuioStrings (objets personnalisés, ajoutés aux dll client et serveur TUIO).
-
-Dans les programmes, les curseurs 3D sont principalement utilisés pour transmettre les coordonnées X, Y et Z (X et Y étant des pixels, et Z une distance en mètres). Les strings, quant à eux, ne véhiculent que de simples messages textuels.
-
-Ils sont envoyés par des listes présentes dans le client TUIO.
-
-Voici un bout de code expliquant comment obtenir la position des mains :
-
-TuioProcessing tuioClient;
-tuioClient = new TuioProcessing(host, port; //host pourrait être this par défaut et port le numéro du port au format int.
-//On récupère les curseurs.
-Vector tuioCursorList = tuioClient.getTuioCursors();
-//Si aucune main n'est repérée.
-if(tuioCursorList.size() <= 0)
-{
- //fonction_1();
-}
-//Si une main est repérée.
-else if (tuioCursorList.size() == 1)
-{
- TuioCursor cursor = (TuioCursor)tuioCursorList.elementAt(0);
- //fonctionAffiche1Main(cursor);
-}
-//Si c'est les 2.
-else if(tuioCursorList.size() == 2)
-{
- //fonctionAffiche2Mains(tuioCursorList);
-}
-
-Voici à présent comment extraire les positions d'une main, via un tuioCursor :
-
-//On obtient la liste des points (déplacements) du curseur TUIO.
-Vector pointList = cursor.getPath();
-for (int j=0;j<pointList.size();j++)
-{
- //On prend chaque point pour les afficher.
- TuioPoint pt = (TuioPoint)pointList.get(j);
- //On affiche les coordonnées dans la fenêtre à la position (100 ; j*20), j allant de 20 à N.
- text(pt.getX() + " " + pt.getY() + " " + pt.getZ(), 100, j*20+20);
- //Si deux mains sont détectées, on quitte la fonction.
- if(tuioClient.getTuioCursors().size() == 2)
- break;
-}
-
-Il est à noter que plusieurs projets existent sous Processing, notamment dans l'affichage de fluides ou de fumée par exemple :
-
-http://processing.org/discourse/yabb/YaBB.cgi?board=Contribution_Simlation;action=display;num=1045166270
-http://bodytag.org/nav.php?u=fluid3/
-http://bodytag.org/fluid3/fluid3.pde
-http://bodytag.org/nav.php?u=smoke2/
-http://bodytag.org/smoke2/smoke2.pde
-
-Si vous expérimentez des difficultés ou souhaitez me soumettre une requête, voici mon adresse : alexandre.bastien@iri.centrepompidou.fr
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/front_processing/doc/tutorial_front_processing.html Thu Mar 22 18:15:53 2012 +0100
@@ -0,0 +1,263 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="has_sidebar fixed-header earthrise">
+ <head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
+ <meta name="description" content="Tutoriel sur le développement et l'utilisation de code Processing utilisant le Middleware TraKERS."/>
+ <meta name="keywords" content="TraKERS, TraKERS Processing, TraKERS Front Processing, TraKERS Front, Kinect Processing"/>
+ <title>TraKERS - Tutorial Processing</title>
+ </head>
+
+ <body>
+ <p>TraKERS (Tracking using Kinect and Extracting Robust Skeletons) est une interface basée sur la détection de gestures / positions du squelette envoyé par le SDK Microsoft (1.0) de Kinect. Il est composé d'un Middleware assurant l'interaction avec Kinect, un rendu visuel et l'envoi de notifications sous forme de messages OSC.
+ Le deuxième module de ce projet est un Front en Processing doté d'un client TUIO et récupérant les messages OSC (sous forme d'objets tels que des Curseurs ou des Strings).</p>
+
+ <p>Ce tutoriel concerne ce second module et a pour but d'expliquer le fonctionnement général d'un sketch Processing et la récupération des notifications du Middleware. Il sera agrémenté d'exemples fonctionnels créés pour les besoins de ce tutoriel ou inspirés d'exemples réels disponibles sur le site processing.org.</p>
+
+ <ol type="I">
+ <a href="#I"><li>Installation de Processing</li></a>
+ <a href="#II"><li>Structure d'un sketch</li></a>
+ <a href="#III"><li>Fonctions principales de Processing</li></a>
+ <a href="#IV"><li>Récupérer les objets envoyés par le Middleware TraKERS via un Client TUIO</li></a>
+ <a href="#V"><li>Interactions entre les objets TUIO récupérés et des fonctions de dessin basiques</li></a>
+ <a href="#VI"><li>Quelques exemples d'implémentation</li></a>
+ <a href="#VII"><li>Références</li></a>
+ </ol>
+
+ <hr />
+
+ <ol type="I" start="1">
+ <a name="I"><li>Installation de Processing</li></a>
+ </ol>
+
+ <p>Avant de pouvoir modifier les sketches Processing fournis dans l'installateur, il est nécessaire d'installer Processing.<br />
+ Vous trouverez l'archive ici :</p>
+
+ <a href="http://processing.googlecode.com/files/processing-1.5.1-windows.zip">Processing pour Windows avec Java</a><br />
+ <a href="http://processing.googlecode.com/files/processing-1.5.1-windows-expert.zip">Processing pour Windows sans Java</a>
+
+ <p>Une fois téléchargé, il vous suffit de le dézipper, et d'affecter tous les types de fichiers .pde à l'exécutable Processing fourni dans l'archive.</p>
+
+ <p>Si ce n'est pas déjà fait, il peut être utile de spécifier dans le path Windows l'emplacement du répertoire où vous avez extrait l'archive.</p>
+
+ <hr />
+
+ <ol type="I" start="2">
+ <a name="#II"><li>Structure d'un sketch</li></a>
+ </ol>
+
+ <p>Un sketch est représenté par un dossier, contenant plusieurs choses :
+ <ul>
+ <li>Un ou plusieurs fichiers d'extension .pde (Qui contiennent le code Processing). Le .pde principal doit avoir le même nom que le dossier qui les contient.</li>
+ <li>Un dossier code, contenant les libraries appelées dans les fichiers .pde.</li>
+ </ul>
+ Si le sketch a été exporté en application, le dossier principal contient également jusqu'à trois dossiers, qui sont :
+ <ul>
+ <li>application.linux (si l'option Linux a été cochée durant l'export).</li>
+ <li>application.macosx (si l'option Mac OS X a été cochée durant l'export).</li>
+ <li>application.windows (si l'option Windows a été cochée durant l'export).</li>
+ </ul>
+ Ceux-ci contiennent les applications compilées du code source des fichiers .pde.<br />
+ Il est également possible d'exporter un applet. On obtiendra donc :
+ <ul>
+ <li>applet (si l'option Linux a été cochée durant l'export).</li>
+ </ul>
+ </p>
+
+ <p>Concernant le projet TraKERS, les sketches fournis peuvent contenir différents fichiers .pde (un pour chaque classe), un fichier TuioFunctions.pde permettant de récupérer les objets TUIO envoyés par le Middleware et un fichier principal du même nom que le sketch.</p>
+
+ <hr />
+
+ <ol type="I" start="3">
+ <a name="#III"><li>Fonctions principales de Processing</li></a>
+ </ol>
+
+ <p>En Processing, les variables déclarées absolues (en dehors d'une fonction ou d'une classe) sont visibles dans tous les autres fichiers .pde du sketch. Il en va de même pour les classes et fonctions (et non méthodes de classe, qui est une fonction appartenant à la classe et donc ne pouvant être appelée qu'en créant un objet de cette classe).</p>
+ <p>Il existe deux fonctions principales, qui sont :
+ <ul>
+ <li>void setup() : Initialise les différentes variables du sketch.</li>
+ <li>void draw() : Fonction rappelée automatiquement, destinée à contenir des instructions de dessin ou des appels de fonctions.</li>
+ </ul>
+ La gestion des événements souris est naturelle, comme l'indique l'exemple ci-dessous:<br /><br />
+
+ <code>
+ public void setup()<br />
+ {<br />
+ size(200,200);<br />
+ background(0);<br />
+ }<br />
+ <br />
+ public void draw()<br />
+ {<br />
+ stroke(255);<br />
+ if(mousePressed)<br />
+ {<br />
+ line(mouseX,mouseY,pmouseX,pmouseY);<br />
+ }<br />
+ }<br />
+ </code>
+ <br />
+ </p>
+
+ <hr />
+
+ <ol type="I" start="4">
+ <a name="#IV"><li>Récupérer les objets envoyés par le Middleware TraKERS via un Client TUIO</li></a>
+ </ol>
+
+ <p>Les objets TUIO exploités dans le cadre de TraKERS sont de deux types :
+ <ul>
+ <li>TuioCursor : Les curseurs sont utilisés pour transmettre des points au Front Processing. On récupère leurs coordonnées sous forme de TuioPoint, qui possèdent comme attributs les valeurs du point en X, Y et Z.</li>
+ <li>TuioString : Elles comportent une String ayant pour valeur la notification du Middleware en cas de détection de gesture par exemple.</li>
+ </ul>
+ </p>
+
+ <p>Voici les différentes implémentations permettant d'accéder à ces objets via le client.
+ On appelle dans cet exemple plusieurs fonctions si des curseurs on été reçus par le client.<br />
+ Un curseur représente une main dans la zone de recherche des mains présente dans le Middleware.<br /><br />
+ <code>
+ void tuioInput()<br />
+ {<br />
+ Vector tuioCursorList = tuioClient.getTuioCursors();<br />
+ <br />
+ if(tuioCursorList.size() <= 0)<br />
+ {<br />
+ //Code si on ne reçoit pas de curseurs <=> que aucune main n'est dans la zone de recherche des mains.<br />
+ }<br />
+ <br />
+ if(tuioCursorList.size() == 1)<br />
+ {<br />
+ //Code si une main est détectée.<br />
+ //Par exemple, on peut faire appel à une fonction qu'on nommera arbitrairement handleOneHand et qui prendra en paramètre le curseur.<br />
+ handleOneHand(tuioCursorList.elementAt(0));<br />
+ }<br />
+ else if(tuioCursorList.size() == 2)<br />
+ {<br />
+ //Code si les deux mains sont détectées.<br />
+ //Par exemple, on peut faire appel à une fonction qu'on nommera arbitrairement handleBothHands et qui prendra en paramètre la liste des curseurs récupérés par le client.<br />
+ handleBothHands(tuioCursorList);<br />
+ }<br />
+ }<br />
+ </code>
+ Le code suivant montre comment on peut extraire le point contenu dans le curseur.<br />
+ <code>
+ void handleOneHand(TuioCursor handCursor)<br />
+ {<br />
+ TuioPoint pt = handCursor.getPosition();//(TuioPoint)pointList.get(j);<br />
+ //Code manipulant le point.<br />
+ //Par exemple un affichage de texte.<br />
+ text(pt.getX() + " " + pt.getY() + " " + pt.getZ());<br />
+ }<br />
+ </code>
+ Le code suivant montre comment on peut extraire les points contenus dans une liste de deux curseurs.<br />
+ <code>
+ void handleBothHands(Vector tuioCursorList)<br />
+ {<br />
+ TuioCursor handLeftCursor = (TuioCursor)tuioCursorList.elementAt(0);<br />
+ TuioCursor handRightCursor = (TuioCursor)tuioCursorList.elementAt(1);<br />
+ TuioPoint pt;<br />
+ <br />
+ pt = (TuioPoint)handLeftCursor.getPosition();<br />
+ //Code pour traiter la position de la première main.<br />
+ //Par exemple un affichage de texte.<br />
+ text(pt.getX() + " " + pt.getY() + " " + pt.getZ());<br />
+ pt = (TuioPoint)handRightCursor.getPosition();<br />
+ //Code pour traiter la position de la seconde main.<br />
+ //Par exemple un affichage de texte.<br />
+ text(pt.getX() + " " + pt.getY() + " " + pt.getZ());<br />
+ }<br />
+ </code>
+ </p>
+
+ <p>On appelle dans cet exemple une fonction si un message a été reçu par le client.<br />
+ Un message représente un événement notifié par le Middleware.<br /><br />
+ <code>
+ void tuioInput()<br />
+ {<br />
+ Vector tuioStringList = tuioClient.getTuioStrings();<br />
+ if(tuioStringList.size() <= 0)<br />
+ {<br />
+ text("Gesture non détectée.");<br />
+ }<br />
+ else<br />
+ {<br />
+ TuioString message = (TuioString)tuioStringList.elementAt(0);<br />
+ text(message.getMessage());<br />
+ }<br />
+ }<br />
+ </code>
+ </p>
+
+ <hr />
+
+ <ol type="I" start="5">
+ <a name="#V"><li>Interactions entre les objets TUIO récupérés et des fonctions de dessin basiques</li></a>
+ </ol>
+
+ <p>Dans les exemples de code vu précédemment, nous aurions pu remplacer la fonction text() par une fonction de votre cru, comme celle-ci :<br /><br />
+ <code>
+ //Cette fonction dessine une ellipse à la position (x;y;z) et prend en paramètre la fait qu'il s'agisse de la main droite ou gauche.<br />
+ void drawEllipse(float x, float y, float z, boolean leftHand)<br />
+ {<br />
+ //On met la couleur de ce qui va venir en bleu.<br />
+ fill(0, 0, 255);<br />
+ //On ne met pas de bordure à ce qu'on va afficher.<br />
+ stroke(0,0,0);<br />
+ //On créer un point, une épaisseur de forme.<br />
+ //Z est la distance de la main par rapport à Kinect. La zone de recherche des mains est toujours comprise entre minDistHands et maxDistHands<br />
+ float weight = map(z, minDistHands, maxDistHands, 50, 1);<br />
+ float redColor = map(z, minDistHands, maxDistHands, 255, 80);<br />
+ <br />
+ //S'il s'agit de la main gauche, on colore en tons de rouge.<br />
+ if(leftHand)<br />
+ fill(redColor,0,0);<br />
+ //Sinon en tons de vert.<br />
+ else<br />
+ fill(0,redColor,0);<br />
+ <br />
+ //Si le trait est assez gros, on color en tons de bleu.<br />
+ if(weight >= 30)<br />
+ {<br />
+ fill(0, 0, redColor);<br />
+ }<br />
+ <br />
+ //On dessine une ellipse.<br />
+ ellipse(x+20, y+100, weight, weight);<br />
+ }<br />
+ </code>
+ </p>
+
+ <hr />
+
+ <ol type="I" start="6">
+ <a name="#VI"><li>Quelques exemples d'implémentation</li></a>
+ </ol>
+
+ <p>Les exemples fournis dans l'installeur sont répartis dans 4 dossiers principaux :
+ <ul>
+ <li>Trakers : Permet d'afficher des ellipses sur le passage d'une ou deux mains se situant à une certaine distance de Kinect.</li>
+ <li>Trakers_gestures : Permet d'afficher le code des gestures détectées par Kinect et notifiées depuis le Middleware.</li>
+ <li>Fluid_manipulation (code importé de processing.org) : Simule l'action des mains sur un fluide.</li>
+ <li>Smoke_manipulation (code importé de processing.org) : Simule l'action des mains sur de la fumée.</li>
+ <li><a href="http://processing.org/">Processing.org</a></li>
+ <li>Interaction examples (code importé de processing.org) : Quelques petits exemples utilisant des formes basiques et réagissant à la position de la main la plus proche de Kinect.</li>
+ </ul>
+ </p>
+
+ <hr />
+
+ <ol type="I" start="7">
+ <a name="#VII"><li>Références</li></a>
+ </ol>
+
+ <p>Voici quelques liens utiles où se trouvent les dépendances trop lourdes pour être incluses dans cet installeur. Ils vont permettront également d'approfondissant vos connaissances sur Processing ou TUIO.
+ Il vous est possible d'utiliser eclipse pour compiler du Processing.
+ <ul>
+ <li><a href="http://www.microsoft.com/download/en/details.aspx?id=28782">SDK Kinect 1.0 de Microsoft</a></li>
+ <li><a href="http://www.tuio.org/">TUIO</a></li>
+ <li><a href="http://processing.org/">Processing.org</a></li>
+ <li><a href="http://bodytag.org/">Autres exemples en Processing</a></li>
+ <li><a href="http://processing.org/learning/eclipse/">Processing sous eclipse</a></li>
+ </ul>
+ </p>
+ </body>
+</html>
\ No newline at end of file
--- a/front_processing/extern/TUIO_JAVA/LICENSE.txt Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/LICENSE.txt Thu Mar 22 18:15:53 2012 +0100
@@ -1,12 +1,12 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -56,7 +56,7 @@
The precise terms and conditions for copying, distribution and
modification follow.
- GNU GENERAL PUBLIC LICENSE
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -255,7 +255,7 @@
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
- How to Apply These Terms to Your New Programs
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
--- a/front_processing/extern/TUIO_JAVA/README.txt Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/README.txt Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-TUIO JAVA LIBRARY AND EXAMPLES
+TUIO JAVA LIBRARY AND EXAMPLES
------------------------------
Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
This software is part of reacTIVision, an open source fiducial
@@ -9,8 +9,8 @@
Demo Applications:
------------------
This package contains three demo applications which receive
-TUIO messages from any TUIO enabled tracker or the Simulator.
-All these applications show how to use the TUIO Java Library
+TUIO messages from any TUIO enabled tracker or the Simulator.
+All these applications show how to use the TUIO Java Library
in a simple way.
TuioDemo graphically displays the object and cursor state,
@@ -40,14 +40,14 @@
Your application needs to implement the TuioListener interface,
and has to be added to the TuioClient in order to receive messages.
- "class MyApplication implements TuioListener"
+ "class MyApplication implements TuioListener"
A simple code snippet for setting up a TUIO session:
- MyApplication app = new MyApplication();
- TuioClient client = new TuioClient();
- client.addTuioListener(app);
- client.connect();
+ MyApplication app = new MyApplication();
+ TuioClient client = new TuioClient();
+ client.addTuioListener(app);
+ client.connect();
A TuioListener needs to implement the following methods:
--- a/front_processing/extern/TUIO_JAVA/TuioApplet.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/TuioApplet.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<html>
+<html>
<head>
<title>TuioApplet</title>
</head>
--- a/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioClient.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioClient.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioCursor.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioCursor.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioListener.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioListener.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioObject.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioObject.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioPoint.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioPoint.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioTime.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/TUIO/TuioTime.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/TUIO/package-frame.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/TUIO/package-frame.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/TUIO/package-summary.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/TUIO/package-summary.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/TUIO/package-tree.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/TUIO/package-tree.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/allclasses-frame.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/allclasses-frame.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/allclasses-noframe.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/allclasses-noframe.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/constant-values.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/constant-values.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/deprecated-list.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/deprecated-list.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/help-doc.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/help-doc.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/index-all.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/index-all.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/index.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/index.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/overview-tree.html Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/overview-tree.html Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
--- a/front_processing/extern/TUIO_JAVA/doc/package-list Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/package-list Thu Mar 22 18:15:53 2012 +0100
@@ -1,1 +1,1 @@
-TUIO
+TUIO
--- a/front_processing/extern/TUIO_JAVA/doc/stylesheet.css Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/doc/stylesheet.css Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/* Javadoc style sheet */
+/* Javadoc style sheet */
/* Define colors, fonts and other style attributes here to override the defaults */
--- a/front_processing/extern/TUIO_JAVA/src/TUIO/TuioClient.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TUIO/TuioClient.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,8 +1,8 @@
-/*
- TUIO Java backend - part of the reacTIVision project
- http://reactivision.sourceforge.net/
+/*
+ TUIO Java backend - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -37,607 +37,607 @@
* @version 1.4
*/
public class TuioClient implements OSCListener {
-
- public String comm;
-
- private int port = 3333;
- private OSCPortIn oscPort;
- private boolean connected = false;
- private Hashtable<Long,TuioObject> objectList = new Hashtable<Long,TuioObject>();
- private Vector<Long> aliveObjectList = new Vector<Long>();
- private Vector<Long> newObjectList = new Vector<Long>();
- private Hashtable<Long,TuioCursor> cursorList = new Hashtable<Long,TuioCursor>();
- private Vector<Long> aliveCursorList = new Vector<Long>();
- private Vector<Long> newCursorList = new Vector<Long>();
- private Hashtable<Long,TuioString> stringList = new Hashtable<Long,TuioString>();
- private Vector<Long> aliveStringList = new Vector<Long>();
- private Vector<Long> newStringList = new Vector<Long>();
+
+ public String comm;
+
+ private int port = 3333;
+ private OSCPortIn oscPort;
+ private boolean connected = false;
+ private Hashtable<Long,TuioObject> objectList = new Hashtable<Long,TuioObject>();
+ private Vector<Long> aliveObjectList = new Vector<Long>();
+ private Vector<Long> newObjectList = new Vector<Long>();
+ private Hashtable<Long,TuioCursor> cursorList = new Hashtable<Long,TuioCursor>();
+ private Vector<Long> aliveCursorList = new Vector<Long>();
+ private Vector<Long> newCursorList = new Vector<Long>();
+ private Hashtable<Long,TuioString> stringList = new Hashtable<Long,TuioString>();
+ private Vector<Long> aliveStringList = new Vector<Long>();
+ private Vector<Long> newStringList = new Vector<Long>();
- private Vector<TuioObject> frameObjects = new Vector<TuioObject>();
- private Vector<TuioCursor> frameCursors = new Vector<TuioCursor>();
- private Vector<TuioString> frameStrings = new Vector<TuioString>();
+ private Vector<TuioObject> frameObjects = new Vector<TuioObject>();
+ private Vector<TuioCursor> frameCursors = new Vector<TuioCursor>();
+ private Vector<TuioString> frameStrings = new Vector<TuioString>();
- private Vector<TuioCursor> freeCursorList = new Vector<TuioCursor>();
- private int maxCursorID = -1;
-
- private Vector<TuioString> freeStringList = new Vector<TuioString>();
- private int maxStringID = -1;
-
- private long currentFrame = 0;
- private TuioTime currentTime;
+ private Vector<TuioCursor> freeCursorList = new Vector<TuioCursor>();
+ private int maxCursorID = -1;
+
+ private Vector<TuioString> freeStringList = new Vector<TuioString>();
+ private int maxStringID = -1;
+
+ private long currentFrame = 0;
+ private TuioTime currentTime;
- private Vector<TuioListener> listenerList = new Vector<TuioListener>();
-
- /**
- * The default constructor creates a client that listens to the default TUIO port 3333
- */
- public TuioClient() {}
+ private Vector<TuioListener> listenerList = new Vector<TuioListener>();
+
+ /**
+ * The default constructor creates a client that listens to the default TUIO port 3333
+ */
+ public TuioClient() {}
- /**
- * This constructor creates a client that listens to the provided port
- *
- * @param port the listening port number
- */
- public TuioClient(int port) {
- this.port = port;
- }
-
- /**
- * The TuioClient starts listening to TUIO messages on the configured UDP port
- * All reveived TUIO messages are decoded and the resulting TUIO events are broadcasted to all registered TuioListeners
- */
- public void connect() {
+ /**
+ * This constructor creates a client that listens to the provided port
+ *
+ * @param port the listening port number
+ */
+ public TuioClient(int port) {
+ this.port = port;
+ }
+
+ /**
+ * The TuioClient starts listening to TUIO messages on the configured UDP port
+ * All reveived TUIO messages are decoded and the resulting TUIO events are broadcasted to all registered TuioListeners
+ */
+ public void connect() {
- TuioTime.initSession();
- currentTime = new TuioTime();
- currentTime.reset();
-
- try {
- oscPort = new OSCPortIn(port);
- oscPort.addListener("/tuio/2Dobj",this);
- oscPort.addListener("/tuio/3Dcur",this);
- oscPort.addListener("/tuio/_siP",this);
- oscPort.startListening();
- connected = true;
- } catch (Exception e) {
- System.out.println("TuioClient: failed to connect to port "+port);
- connected = false;
- }
- }
-
- /**
- * The TuioClient stops listening to TUIO messages on the configured UDP port
- */
- public void disconnect() {
- oscPort.stopListening();
- try { Thread.sleep(100); }
- catch (Exception e) {};
- oscPort.close();
- connected = false;
- }
+ TuioTime.initSession();
+ currentTime = new TuioTime();
+ currentTime.reset();
+
+ try {
+ oscPort = new OSCPortIn(port);
+ oscPort.addListener("/tuio/2Dobj",this);
+ oscPort.addListener("/tuio/3Dcur",this);
+ oscPort.addListener("/tuio/_siP",this);
+ oscPort.startListening();
+ connected = true;
+ } catch (Exception e) {
+ System.out.println("TuioClient: failed to connect to port "+port);
+ connected = false;
+ }
+ }
+
+ /**
+ * The TuioClient stops listening to TUIO messages on the configured UDP port
+ */
+ public void disconnect() {
+ oscPort.stopListening();
+ try { Thread.sleep(100); }
+ catch (Exception e) {};
+ oscPort.close();
+ connected = false;
+ }
- /**
- * Returns true if this TuioClient is currently connected.
- * @return true if this TuioClient is currently connected
- */
- public boolean isConnected() { return connected; }
+ /**
+ * Returns true if this TuioClient is currently connected.
+ * @return true if this TuioClient is currently connected
+ */
+ public boolean isConnected() { return connected; }
- /**
- * Adds the provided TuioListener to the list of registered TUIO event listeners
- *
- * @param listener the TuioListener to add
- */
- public void addTuioListener(TuioListener listener) {
- listenerList.addElement(listener);
- }
-
- /**
- * Removes the provided TuioListener from the list of registered TUIO event listeners
- *
- * @param listener the TuioListener to remove
- */
- public void removeTuioListener(TuioListener listener) {
- listenerList.removeElement(listener);
- }
+ /**
+ * Adds the provided TuioListener to the list of registered TUIO event listeners
+ *
+ * @param listener the TuioListener to add
+ */
+ public void addTuioListener(TuioListener listener) {
+ listenerList.addElement(listener);
+ }
+
+ /**
+ * Removes the provided TuioListener from the list of registered TUIO event listeners
+ *
+ * @param listener the TuioListener to remove
+ */
+ public void removeTuioListener(TuioListener listener) {
+ listenerList.removeElement(listener);
+ }
- /**
- * Removes all TuioListener from the list of registered TUIO event listeners
- */
- public void removeAllTuioListeners() {
- listenerList.clear();
- }
-
- /**
- * Returns a Vector of all currently active TuioObjects
- *
- * @return a Vector of all currently active TuioObjects
- */
- public Vector<TuioObject> getTuioObjects() {
- return new Vector<TuioObject>(objectList.values());
- }
-
- /**
- * Returns a Vector of all currently active TuioCursors
- *
- * @return a Vector of all currently active TuioCursors
- */
- public Vector<TuioCursor> getTuioCursors() {
- return new Vector<TuioCursor>(cursorList.values());
- }
-
- /**
- * Returns a Vector of all currently active TuioStrings
- *
- * @return a Vector of all currently active TuioStrings
- */
- public Vector<TuioString> getTuioStrings() {
- return new Vector<TuioString>(stringList.values());
- }
+ /**
+ * Removes all TuioListener from the list of registered TUIO event listeners
+ */
+ public void removeAllTuioListeners() {
+ listenerList.clear();
+ }
+
+ /**
+ * Returns a Vector of all currently active TuioObjects
+ *
+ * @return a Vector of all currently active TuioObjects
+ */
+ public Vector<TuioObject> getTuioObjects() {
+ return new Vector<TuioObject>(objectList.values());
+ }
+
+ /**
+ * Returns a Vector of all currently active TuioCursors
+ *
+ * @return a Vector of all currently active TuioCursors
+ */
+ public Vector<TuioCursor> getTuioCursors() {
+ return new Vector<TuioCursor>(cursorList.values());
+ }
+
+ /**
+ * Returns a Vector of all currently active TuioStrings
+ *
+ * @return a Vector of all currently active TuioStrings
+ */
+ public Vector<TuioString> getTuioStrings() {
+ return new Vector<TuioString>(stringList.values());
+ }
- /**
- * Returns the TuioObject corresponding to the provided Session ID
- * or NULL if the Session ID does not refer to an active TuioObject
- *
- * @return an active TuioObject corresponding to the provided Session ID or NULL
- */
- public TuioObject getTuioObject(long s_id) {
- return objectList.get(s_id);
- }
-
- /**
- * Returns the TuioCursor corresponding to the provided Session ID
- * or NULL if the Session ID does not refer to an active TuioCursor
- *
- * @return an active TuioCursor corresponding to the provided Session ID or NULL
- */
- public TuioCursor getTuioCursor(long s_id) {
- return cursorList.get(s_id);
- }
+ /**
+ * Returns the TuioObject corresponding to the provided Session ID
+ * or NULL if the Session ID does not refer to an active TuioObject
+ *
+ * @return an active TuioObject corresponding to the provided Session ID or NULL
+ */
+ public TuioObject getTuioObject(long s_id) {
+ return objectList.get(s_id);
+ }
+
+ /**
+ * Returns the TuioCursor corresponding to the provided Session ID
+ * or NULL if the Session ID does not refer to an active TuioCursor
+ *
+ * @return an active TuioCursor corresponding to the provided Session ID or NULL
+ */
+ public TuioCursor getTuioCursor(long s_id) {
+ return cursorList.get(s_id);
+ }
- /**
- * Returns the TuioString corresponding to the provided Session ID
- * or NULL if the Session ID does not refer to an active TuioString
- *
- * @return an active TuioString corresponding to the provided Session ID or NULL
- */
- public TuioString getTuioString(long s_id) {
- return stringList.get(s_id);
- }
+ /**
+ * Returns the TuioString corresponding to the provided Session ID
+ * or NULL if the Session ID does not refer to an active TuioString
+ *
+ * @return an active TuioString corresponding to the provided Session ID or NULL
+ */
+ public TuioString getTuioString(long s_id) {
+ return stringList.get(s_id);
+ }
- /**
- * The OSC callback method where all TUIO messages are received and decoded
- * and where the TUIO event callbacks are dispatched
- *
- * @param date the time stamp of the OSC bundle
- * @param message the received OSC message
- */
- public void acceptMessage(Date date, OSCMessage message) {
-
- Object[] args = message.getArguments();
- String command = (String)args[0];
- String address = message.getAddress();
+ /**
+ * The OSC callback method where all TUIO messages are received and decoded
+ * and where the TUIO event callbacks are dispatched
+ *
+ * @param date the time stamp of the OSC bundle
+ * @param message the received OSC message
+ */
+ public void acceptMessage(Date date, OSCMessage message) {
+
+ Object[] args = message.getArguments();
+ String command = (String)args[0];
+ String address = message.getAddress();
- if (address.equals("/tuio/2Dobj")) {
+ if (address.equals("/tuio/2Dobj")) {
- if (command.equals("set")) {
-
- long s_id = ((Integer)args[1]).longValue();
- int c_id = ((Integer)args[2]).intValue();
- float xpos = ((Float)args[3]).floatValue();
- float ypos = ((Float)args[4]).floatValue();
- float angle = ((Float)args[5]).floatValue();
- float xspeed = ((Float)args[6]).floatValue();
- float yspeed = ((Float)args[7]).floatValue();
- float rspeed = ((Float)args[8]).floatValue();
- float maccel = ((Float)args[9]).floatValue();
- float raccel = ((Float)args[10]).floatValue();
-
- if (objectList.get(s_id) == null) {
-
- TuioObject addObject = new TuioObject(s_id,c_id,xpos,ypos,angle);
- frameObjects.addElement(addObject);
-
- } else {
-
- TuioObject tobj = objectList.get(s_id);
- if (tobj==null) return;
- if ((tobj.xpos!=xpos) || (tobj.ypos!=ypos) || (tobj.angle!=angle) || (tobj.x_speed!=xspeed) || (tobj.y_speed!=yspeed) || (tobj.rotation_speed!=rspeed) || (tobj.motion_accel!=maccel) || (tobj.rotation_accel!=raccel)) {
-
- TuioObject updateObject = new TuioObject(s_id,c_id,xpos,ypos,angle);
- updateObject.update(xpos,ypos,angle,xspeed,yspeed,rspeed,maccel,raccel);
- frameObjects.addElement(updateObject);
- }
-
- }
-
- } else if (command.equals("alive")) {
-
- newObjectList.clear();
- for (int i=1;i<args.length;i++) {
- // get the message content
- long s_id = ((Integer)args[i]).longValue();
- newObjectList.addElement(s_id);
- // reduce the object list to the lost objects
- if (aliveObjectList.contains(s_id))
- aliveObjectList.removeElement(s_id);
- }
-
- // remove the remaining objects
- for (int i=0;i<aliveObjectList.size();i++) {
- TuioObject removeObject = objectList.get(aliveObjectList.elementAt(i));
- if (removeObject==null) continue;
- removeObject.remove(currentTime);
- frameObjects.addElement(removeObject);
- }
-
- } else if (command.equals("fseq")) {
-
- long fseq = ((Integer)args[1]).longValue();
- boolean lateFrame = false;
-
- if (fseq>0) {
- if (fseq>currentFrame) currentTime = TuioTime.getSessionTime();
- if ((fseq>=currentFrame) || ((currentFrame-fseq)>100)) currentFrame=fseq;
- else lateFrame = true;
- } else if (TuioTime.getSessionTime().subtract(currentTime).getTotalMilliseconds()>100) {
- currentTime = TuioTime.getSessionTime();
- }
-
- if (!lateFrame) {
- Enumeration<TuioObject> frameEnum = frameObjects.elements();
- while(frameEnum.hasMoreElements()) {
- TuioObject tobj = frameEnum.nextElement();
-
- switch (tobj.getTuioState()) {
- case TuioObject.TUIO_REMOVED:
- TuioObject removeObject = tobj;
- removeObject.remove(currentTime);
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.removeTuioObject(removeObject);
- }
- objectList.remove(removeObject.getSessionID());
- break;
+ if (command.equals("set")) {
+
+ long s_id = ((Integer)args[1]).longValue();
+ int c_id = ((Integer)args[2]).intValue();
+ float xpos = ((Float)args[3]).floatValue();
+ float ypos = ((Float)args[4]).floatValue();
+ float angle = ((Float)args[5]).floatValue();
+ float xspeed = ((Float)args[6]).floatValue();
+ float yspeed = ((Float)args[7]).floatValue();
+ float rspeed = ((Float)args[8]).floatValue();
+ float maccel = ((Float)args[9]).floatValue();
+ float raccel = ((Float)args[10]).floatValue();
+
+ if (objectList.get(s_id) == null) {
+
+ TuioObject addObject = new TuioObject(s_id,c_id,xpos,ypos,angle);
+ frameObjects.addElement(addObject);
+
+ } else {
+
+ TuioObject tobj = objectList.get(s_id);
+ if (tobj==null) return;
+ if ((tobj.xpos!=xpos) || (tobj.ypos!=ypos) || (tobj.angle!=angle) || (tobj.x_speed!=xspeed) || (tobj.y_speed!=yspeed) || (tobj.rotation_speed!=rspeed) || (tobj.motion_accel!=maccel) || (tobj.rotation_accel!=raccel)) {
+
+ TuioObject updateObject = new TuioObject(s_id,c_id,xpos,ypos,angle);
+ updateObject.update(xpos,ypos,angle,xspeed,yspeed,rspeed,maccel,raccel);
+ frameObjects.addElement(updateObject);
+ }
+
+ }
+
+ } else if (command.equals("alive")) {
+
+ newObjectList.clear();
+ for (int i=1;i<args.length;i++) {
+ // get the message content
+ long s_id = ((Integer)args[i]).longValue();
+ newObjectList.addElement(s_id);
+ // reduce the object list to the lost objects
+ if (aliveObjectList.contains(s_id))
+ aliveObjectList.removeElement(s_id);
+ }
+
+ // remove the remaining objects
+ for (int i=0;i<aliveObjectList.size();i++) {
+ TuioObject removeObject = objectList.get(aliveObjectList.elementAt(i));
+ if (removeObject==null) continue;
+ removeObject.remove(currentTime);
+ frameObjects.addElement(removeObject);
+ }
+
+ } else if (command.equals("fseq")) {
+
+ long fseq = ((Integer)args[1]).longValue();
+ boolean lateFrame = false;
+
+ if (fseq>0) {
+ if (fseq>currentFrame) currentTime = TuioTime.getSessionTime();
+ if ((fseq>=currentFrame) || ((currentFrame-fseq)>100)) currentFrame=fseq;
+ else lateFrame = true;
+ } else if (TuioTime.getSessionTime().subtract(currentTime).getTotalMilliseconds()>100) {
+ currentTime = TuioTime.getSessionTime();
+ }
+
+ if (!lateFrame) {
+ Enumeration<TuioObject> frameEnum = frameObjects.elements();
+ while(frameEnum.hasMoreElements()) {
+ TuioObject tobj = frameEnum.nextElement();
+
+ switch (tobj.getTuioState()) {
+ case TuioObject.TUIO_REMOVED:
+ TuioObject removeObject = tobj;
+ removeObject.remove(currentTime);
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.removeTuioObject(removeObject);
+ }
+ objectList.remove(removeObject.getSessionID());
+ break;
- case TuioObject.TUIO_ADDED:
- TuioObject addObject = new TuioObject(currentTime,tobj.getSessionID(),tobj.getSymbolID(),tobj.getX(),tobj.getY(),tobj.getAngle());
- objectList.put(addObject.getSessionID(),addObject);
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.addTuioObject(addObject);
- }
- break;
-
- default:
- TuioObject updateObject = objectList.get(tobj.getSessionID());
- if ( (tobj.getX()!=updateObject.getX() && tobj.getXSpeed()==0) || (tobj.getY()!=updateObject.getY() && tobj.getYSpeed()==0) )
- updateObject.update(currentTime,tobj.getX(),tobj.getY(),tobj.getAngle());
- else
- updateObject.update(currentTime,tobj.getX(),tobj.getY(),tobj.getAngle(),tobj.getXSpeed(),tobj.getYSpeed(),tobj.getRotationSpeed(),tobj.getMotionAccel(),tobj.getRotationAccel());
+ case TuioObject.TUIO_ADDED:
+ TuioObject addObject = new TuioObject(currentTime,tobj.getSessionID(),tobj.getSymbolID(),tobj.getX(),tobj.getY(),tobj.getAngle());
+ objectList.put(addObject.getSessionID(),addObject);
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.addTuioObject(addObject);
+ }
+ break;
+
+ default:
+ TuioObject updateObject = objectList.get(tobj.getSessionID());
+ if ( (tobj.getX()!=updateObject.getX() && tobj.getXSpeed()==0) || (tobj.getY()!=updateObject.getY() && tobj.getYSpeed()==0) )
+ updateObject.update(currentTime,tobj.getX(),tobj.getY(),tobj.getAngle());
+ else
+ updateObject.update(currentTime,tobj.getX(),tobj.getY(),tobj.getAngle(),tobj.getXSpeed(),tobj.getYSpeed(),tobj.getRotationSpeed(),tobj.getMotionAccel(),tobj.getRotationAccel());
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.updateTuioObject(updateObject);
- }
- }
- }
-
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.refresh(new TuioTime(currentTime));
- }
-
- Vector<Long> buffer = aliveObjectList;
- aliveObjectList = newObjectList;
- // recycling the vector
- newObjectList = buffer;
- }
- frameObjects.clear();
- }
- } else if (address.equals("/tuio/3Dcur")) {
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.updateTuioObject(updateObject);
+ }
+ }
+ }
+
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.refresh(new TuioTime(currentTime));
+ }
+
+ Vector<Long> buffer = aliveObjectList;
+ aliveObjectList = newObjectList;
+ // recycling the vector
+ newObjectList = buffer;
+ }
+ frameObjects.clear();
+ }
+ } else if (address.equals("/tuio/3Dcur")) {
- if (command.equals("set")) {
+ if (command.equals("set")) {
- long s_id = ((Integer)args[1]).longValue();
- float xpos = ((Float)args[2]).floatValue();
- float ypos = ((Float)args[3]).floatValue();
- float zpos = ((Float)args[4]).floatValue();
- float xspeed = ((Float)args[5]).floatValue();
- float yspeed = ((Float)args[6]).floatValue();
- float maccel = ((Float)args[7]).floatValue();
-
- if (cursorList.get(s_id) == null) {
-
- TuioCursor addCursor = new TuioCursor(s_id, -1 ,xpos,ypos,zpos);
- frameCursors.addElement(addCursor);
-
- } else {
-
- TuioCursor tcur = cursorList.get(s_id);
- if (tcur==null) return;
- if ((tcur.xpos!=xpos) || (tcur.ypos!=ypos) || (tcur.zpos!=zpos) || (tcur.x_speed!=xspeed) || (tcur.y_speed!=yspeed) || (tcur.motion_accel!=maccel)) {
+ long s_id = ((Integer)args[1]).longValue();
+ float xpos = ((Float)args[2]).floatValue();
+ float ypos = ((Float)args[3]).floatValue();
+ float zpos = ((Float)args[4]).floatValue();
+ float xspeed = ((Float)args[5]).floatValue();
+ float yspeed = ((Float)args[6]).floatValue();
+ float maccel = ((Float)args[7]).floatValue();
+
+ if (cursorList.get(s_id) == null) {
+
+ TuioCursor addCursor = new TuioCursor(s_id, -1 ,xpos,ypos,zpos);
+ frameCursors.addElement(addCursor);
+
+ } else {
+
+ TuioCursor tcur = cursorList.get(s_id);
+ if (tcur==null) return;
+ if ((tcur.xpos!=xpos) || (tcur.ypos!=ypos) || (tcur.zpos!=zpos) || (tcur.x_speed!=xspeed) || (tcur.y_speed!=yspeed) || (tcur.motion_accel!=maccel)) {
- TuioCursor updateCursor = new TuioCursor(s_id,tcur.getCursorID(),xpos,ypos,zpos);
- updateCursor.update(xpos,ypos,zpos,xspeed,yspeed,maccel);
- frameCursors.addElement(updateCursor);
- }
- }
-
- //System.out.println("set cur " + s_id+" "+xpos+" "+ypos+" "+xspeed+" "+yspeed+" "+maccel);
-
- } else if (command.equals("alive")) {
-
- newCursorList.clear();
- for (int i=1;i<args.length;i++) {
- // get the message content
- long s_id = ((Integer)args[i]).longValue();
- newCursorList.addElement(s_id);
- // reduce the cursor list to the lost cursors
- if (aliveCursorList.contains(s_id))
- aliveCursorList.removeElement(s_id);
- }
-
- // remove the remaining cursors
- for (int i=0;i<aliveCursorList.size();i++) {
- TuioCursor removeCursor = cursorList.get(aliveCursorList.elementAt(i));
- if (removeCursor==null) continue;
- removeCursor.remove(currentTime);
- frameCursors.addElement(removeCursor);
- }
-
- } else if (command.equals("fseq")) {
- long fseq = ((Integer)args[1]).longValue();
- boolean lateFrame = false;
-
- if (fseq>0) {
- if (fseq>currentFrame) currentTime = TuioTime.getSessionTime();
- if ((fseq>=currentFrame) || ((currentFrame-fseq)>100)) currentFrame = fseq;
- else lateFrame = true;
- } else if (TuioTime.getSessionTime().subtract(currentTime).getTotalMilliseconds()>100) {
- currentTime = TuioTime.getSessionTime();
- }
- if (!lateFrame) {
+ TuioCursor updateCursor = new TuioCursor(s_id,tcur.getCursorID(),xpos,ypos,zpos);
+ updateCursor.update(xpos,ypos,zpos,xspeed,yspeed,maccel);
+ frameCursors.addElement(updateCursor);
+ }
+ }
+
+ //System.out.println("set cur " + s_id+" "+xpos+" "+ypos+" "+xspeed+" "+yspeed+" "+maccel);
+
+ } else if (command.equals("alive")) {
+
+ newCursorList.clear();
+ for (int i=1;i<args.length;i++) {
+ // get the message content
+ long s_id = ((Integer)args[i]).longValue();
+ newCursorList.addElement(s_id);
+ // reduce the cursor list to the lost cursors
+ if (aliveCursorList.contains(s_id))
+ aliveCursorList.removeElement(s_id);
+ }
+
+ // remove the remaining cursors
+ for (int i=0;i<aliveCursorList.size();i++) {
+ TuioCursor removeCursor = cursorList.get(aliveCursorList.elementAt(i));
+ if (removeCursor==null) continue;
+ removeCursor.remove(currentTime);
+ frameCursors.addElement(removeCursor);
+ }
+
+ } else if (command.equals("fseq")) {
+ long fseq = ((Integer)args[1]).longValue();
+ boolean lateFrame = false;
+
+ if (fseq>0) {
+ if (fseq>currentFrame) currentTime = TuioTime.getSessionTime();
+ if ((fseq>=currentFrame) || ((currentFrame-fseq)>100)) currentFrame = fseq;
+ else lateFrame = true;
+ } else if (TuioTime.getSessionTime().subtract(currentTime).getTotalMilliseconds()>100) {
+ currentTime = TuioTime.getSessionTime();
+ }
+ if (!lateFrame) {
- Enumeration<TuioCursor> frameEnum = frameCursors.elements();
- while(frameEnum.hasMoreElements()) {
- TuioCursor tcur = frameEnum.nextElement();
-
- switch (tcur.getTuioState()) {
- case TuioCursor.TUIO_REMOVED:
-
- TuioCursor removeCursor = tcur;
- removeCursor.remove(currentTime);
-
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.removeTuioCursor(removeCursor);
- }
+ Enumeration<TuioCursor> frameEnum = frameCursors.elements();
+ while(frameEnum.hasMoreElements()) {
+ TuioCursor tcur = frameEnum.nextElement();
+
+ switch (tcur.getTuioState()) {
+ case TuioCursor.TUIO_REMOVED:
+
+ TuioCursor removeCursor = tcur;
+ removeCursor.remove(currentTime);
+
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.removeTuioCursor(removeCursor);
+ }
- cursorList.remove(removeCursor.getSessionID());
+ cursorList.remove(removeCursor.getSessionID());
- if (removeCursor.getCursorID()==maxCursorID) {
- maxCursorID = -1;
- if (cursorList.size()>0) {
- Enumeration<TuioCursor> clist = cursorList.elements();
- while (clist.hasMoreElements()) {
- int c_id = clist.nextElement().getCursorID();
- if (c_id>maxCursorID) maxCursorID=c_id;
- }
-
- Enumeration<TuioCursor> flist = freeCursorList.elements();
- while (flist.hasMoreElements()) {
- int c_id = flist.nextElement().getCursorID();
- if (c_id>=maxCursorID) freeCursorList.removeElement(c_id);
- }
- } else freeCursorList.clear();
- } else if (removeCursor.getCursorID()<maxCursorID) {
- freeCursorList.addElement(removeCursor);
- }
-
- break;
+ if (removeCursor.getCursorID()==maxCursorID) {
+ maxCursorID = -1;
+ if (cursorList.size()>0) {
+ Enumeration<TuioCursor> clist = cursorList.elements();
+ while (clist.hasMoreElements()) {
+ int c_id = clist.nextElement().getCursorID();
+ if (c_id>maxCursorID) maxCursorID=c_id;
+ }
+
+ Enumeration<TuioCursor> flist = freeCursorList.elements();
+ while (flist.hasMoreElements()) {
+ int c_id = flist.nextElement().getCursorID();
+ if (c_id>=maxCursorID) freeCursorList.removeElement(c_id);
+ }
+ } else freeCursorList.clear();
+ } else if (removeCursor.getCursorID()<maxCursorID) {
+ freeCursorList.addElement(removeCursor);
+ }
+
+ break;
- case TuioCursor.TUIO_ADDED:
+ case TuioCursor.TUIO_ADDED:
- int c_id = cursorList.size();
- if ((cursorList.size()<=maxCursorID) && (freeCursorList.size()>0)) {
- TuioCursor closestCursor = freeCursorList.firstElement();
- Enumeration<TuioCursor> testList = freeCursorList.elements();
- while (testList.hasMoreElements()) {
- TuioCursor testCursor = testList.nextElement();
- if (testCursor.getDistance(tcur)<closestCursor.getDistance(tcur)) closestCursor = testCursor;
- }
- c_id = closestCursor.getCursorID();
- freeCursorList.removeElement(closestCursor);
- } else maxCursorID = c_id;
-
- TuioCursor addCursor = new TuioCursor(currentTime,tcur.getSessionID(),c_id,tcur.getX(),tcur.getY(),tcur.getZ());
- cursorList.put(addCursor.getSessionID(),addCursor);
-
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.addTuioCursor(addCursor);
- }
- break;
-
- default:
-
- TuioCursor updateCursor = cursorList.get(tcur.getSessionID());
- if ( (tcur.getX()!=updateCursor.getX() && tcur.getXSpeed()==0) || (tcur.getY()!=updateCursor.getY() && tcur.getYSpeed()==0) || (tcur.getZ()!=updateCursor.getZ()) )
- updateCursor.update(currentTime,tcur.getX(),tcur.getY(),tcur.getZ());
- else
- updateCursor.update(currentTime,tcur.getX(),tcur.getY(),tcur.getZ(),tcur.getXSpeed(),tcur.getYSpeed(),tcur.getMotionAccel());
-
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.updateTuioCursor(updateCursor);
- }
- }
- }
-
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.refresh(new TuioTime(currentTime));
- }
-
- Vector<Long> buffer = aliveCursorList;
- aliveCursorList = newCursorList;
- // recycling the vector
- newCursorList = buffer;
- }
-
- frameCursors.clear();
- }
- } else if (address.equals("/tuio/_siP")) {
+ int c_id = cursorList.size();
+ if ((cursorList.size()<=maxCursorID) && (freeCursorList.size()>0)) {
+ TuioCursor closestCursor = freeCursorList.firstElement();
+ Enumeration<TuioCursor> testList = freeCursorList.elements();
+ while (testList.hasMoreElements()) {
+ TuioCursor testCursor = testList.nextElement();
+ if (testCursor.getDistance(tcur)<closestCursor.getDistance(tcur)) closestCursor = testCursor;
+ }
+ c_id = closestCursor.getCursorID();
+ freeCursorList.removeElement(closestCursor);
+ } else maxCursorID = c_id;
+
+ TuioCursor addCursor = new TuioCursor(currentTime,tcur.getSessionID(),c_id,tcur.getX(),tcur.getY(),tcur.getZ());
+ cursorList.put(addCursor.getSessionID(),addCursor);
+
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.addTuioCursor(addCursor);
+ }
+ break;
+
+ default:
+
+ TuioCursor updateCursor = cursorList.get(tcur.getSessionID());
+ if ( (tcur.getX()!=updateCursor.getX() && tcur.getXSpeed()==0) || (tcur.getY()!=updateCursor.getY() && tcur.getYSpeed()==0) || (tcur.getZ()!=updateCursor.getZ()) )
+ updateCursor.update(currentTime,tcur.getX(),tcur.getY(),tcur.getZ());
+ else
+ updateCursor.update(currentTime,tcur.getX(),tcur.getY(),tcur.getZ(),tcur.getXSpeed(),tcur.getYSpeed(),tcur.getMotionAccel());
+
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.updateTuioCursor(updateCursor);
+ }
+ }
+ }
+
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.refresh(new TuioTime(currentTime));
+ }
+
+ Vector<Long> buffer = aliveCursorList;
+ aliveCursorList = newCursorList;
+ // recycling the vector
+ newCursorList = buffer;
+ }
+
+ frameCursors.clear();
+ }
+ } else if (address.equals("/tuio/_siP")) {
- if (command.equals("set")) {
+ if (command.equals("set")) {
- long s_id = ((Integer)args[1]).longValue();
- String msg = args[2].toString();
-
- if (stringList.get(s_id) == null) {
-
- TuioString addString = new TuioString(s_id, -1, msg);
- frameStrings.addElement(addString);
-
- } else {
-
- TuioString tstr = stringList.get(s_id);
- if (tstr==null) return;
- if (!tstr.getMessage().equals(msg)) {
+ long s_id = ((Integer)args[1]).longValue();
+ String msg = args[2].toString();
+
+ if (stringList.get(s_id) == null) {
+
+ TuioString addString = new TuioString(s_id, -1, msg);
+ frameStrings.addElement(addString);
+
+ } else {
+
+ TuioString tstr = stringList.get(s_id);
+ if (tstr==null) return;
+ if (!tstr.getMessage().equals(msg)) {
- TuioString updateString = new TuioString(s_id,tstr.getStringID(),msg);
- updateString.update(msg);
- frameStrings.addElement(updateString);
- }
- }
-
- //System.out.println("set cur " + s_id+" "+xpos+" "+ypos+" "+xspeed+" "+yspeed+" "+maccel);
-
- } else if (command.equals("alive")) {
-
- newStringList.clear();
- for (int i=1;i<args.length;i++) {
- // get the message content
- long s_id = ((Integer)args[i]).longValue();
- newStringList.addElement(s_id);
- // reduce the cursor list to the lost cursors
- if (aliveStringList.contains(s_id))
- aliveStringList.removeElement(s_id);
- }
-
- // remove the remaining cursors
- for (int i=0;i<aliveStringList.size();i++) {
- TuioString removeString = stringList.get(aliveStringList.elementAt(i));
- if (removeString==null) continue;
- removeString.remove(currentTime);
- frameStrings.addElement(removeString);
- }
-
- } else if (command.equals("fseq")) {
- long fseq = ((Integer)args[1]).longValue();
- boolean lateFrame = false;
-
- if (fseq>0) {
- if (fseq>currentFrame) currentTime = TuioTime.getSessionTime();
- if ((fseq>=currentFrame) || ((currentFrame-fseq)>100)) currentFrame = fseq;
- else lateFrame = true;
- } else if (TuioTime.getSessionTime().subtract(currentTime).getTotalMilliseconds()>100) {
- currentTime = TuioTime.getSessionTime();
- }
- if (!lateFrame) {
+ TuioString updateString = new TuioString(s_id,tstr.getStringID(),msg);
+ updateString.update(msg);
+ frameStrings.addElement(updateString);
+ }
+ }
+
+ //System.out.println("set cur " + s_id+" "+xpos+" "+ypos+" "+xspeed+" "+yspeed+" "+maccel);
+
+ } else if (command.equals("alive")) {
+
+ newStringList.clear();
+ for (int i=1;i<args.length;i++) {
+ // get the message content
+ long s_id = ((Integer)args[i]).longValue();
+ newStringList.addElement(s_id);
+ // reduce the cursor list to the lost cursors
+ if (aliveStringList.contains(s_id))
+ aliveStringList.removeElement(s_id);
+ }
+
+ // remove the remaining cursors
+ for (int i=0;i<aliveStringList.size();i++) {
+ TuioString removeString = stringList.get(aliveStringList.elementAt(i));
+ if (removeString==null) continue;
+ removeString.remove(currentTime);
+ frameStrings.addElement(removeString);
+ }
+
+ } else if (command.equals("fseq")) {
+ long fseq = ((Integer)args[1]).longValue();
+ boolean lateFrame = false;
+
+ if (fseq>0) {
+ if (fseq>currentFrame) currentTime = TuioTime.getSessionTime();
+ if ((fseq>=currentFrame) || ((currentFrame-fseq)>100)) currentFrame = fseq;
+ else lateFrame = true;
+ } else if (TuioTime.getSessionTime().subtract(currentTime).getTotalMilliseconds()>100) {
+ currentTime = TuioTime.getSessionTime();
+ }
+ if (!lateFrame) {
- Enumeration<TuioString> frameEnum = frameStrings.elements();
- while(frameEnum.hasMoreElements()) {
- TuioString tstr = frameEnum.nextElement();
-
- switch (tstr.getTuioState()) {
- case TuioString.TUIO_REMOVED:
-
- TuioString removeString = tstr;
- removeString.remove(currentTime);
-
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.removeTuioString(removeString);
- }
+ Enumeration<TuioString> frameEnum = frameStrings.elements();
+ while(frameEnum.hasMoreElements()) {
+ TuioString tstr = frameEnum.nextElement();
+
+ switch (tstr.getTuioState()) {
+ case TuioString.TUIO_REMOVED:
+
+ TuioString removeString = tstr;
+ removeString.remove(currentTime);
+
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.removeTuioString(removeString);
+ }
- stringList.remove(removeString.getSessionID());
+ stringList.remove(removeString.getSessionID());
- if (removeString.getStringID()==maxStringID) {
- maxStringID = -1;
- if (stringList.size()>0) {
- Enumeration<TuioString> slist = stringList.elements();
- while (slist.hasMoreElements()) {
- int sl_id = slist.nextElement().getStringID();
- if (sl_id>maxStringID) maxStringID=sl_id;
- }
-
- Enumeration<TuioString> flist = freeStringList.elements();
- while (flist.hasMoreElements()) {
- int sl_id = flist.nextElement().getStringID();
- if (sl_id>=maxStringID) freeStringList.removeElement(sl_id);
- }
- } else freeStringList.clear();
- } else if (removeString.getStringID()<maxStringID) {
- freeStringList.addElement(removeString);
- }
-
- break;
+ if (removeString.getStringID()==maxStringID) {
+ maxStringID = -1;
+ if (stringList.size()>0) {
+ Enumeration<TuioString> slist = stringList.elements();
+ while (slist.hasMoreElements()) {
+ int sl_id = slist.nextElement().getStringID();
+ if (sl_id>maxStringID) maxStringID=sl_id;
+ }
+
+ Enumeration<TuioString> flist = freeStringList.elements();
+ while (flist.hasMoreElements()) {
+ int sl_id = flist.nextElement().getStringID();
+ if (sl_id>=maxStringID) freeStringList.removeElement(sl_id);
+ }
+ } else freeStringList.clear();
+ } else if (removeString.getStringID()<maxStringID) {
+ freeStringList.addElement(removeString);
+ }
+
+ break;
- case TuioString.TUIO_ADDED:
+ case TuioString.TUIO_ADDED:
- int sl_id = stringList.size();
- if ((stringList.size()<=maxStringID) && (freeStringList.size()>0)) {
- TuioString closestString = freeStringList.firstElement();
- Enumeration<TuioString> testList = freeStringList.elements();
- while (testList.hasMoreElements()) {
- TuioString testString = testList.nextElement();
- //if (testString.getDistance(tstr)<closestString.getDistance(tstr))
- closestString = testString;
- }
- sl_id = closestString.getStringID();
- freeStringList.removeElement(closestString);
- } else maxStringID = sl_id;
-
- TuioString addString = new TuioString(currentTime,tstr.getSessionID(),sl_id,tstr.getMessage());
- stringList.put(addString.getSessionID(),addString);
-
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.addTuioString(addString);
- }
- break;
-
- default:
-
- TuioString updateString = stringList.get(tstr.getSessionID());
- if ( tstr.getMessage()!=updateString.getMessage() )
- updateString.update(currentTime,tstr.getMessage());
- else
- updateString.update(currentTime,tstr.getMessage());
-
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.updateTuioString(updateString);
- }
- }
- }
-
- for (int i=0;i<listenerList.size();i++) {
- TuioListener listener = (TuioListener)listenerList.elementAt(i);
- if (listener!=null) listener.refresh(new TuioTime(currentTime));
- }
-
- Vector<Long> buffer = aliveStringList;
- aliveStringList = newStringList;
- // recycling the vector
- newStringList = buffer;
- }
-
- frameStrings.clear();
- }
- }
-
-
- }
+ int sl_id = stringList.size();
+ if ((stringList.size()<=maxStringID) && (freeStringList.size()>0)) {
+ TuioString closestString = freeStringList.firstElement();
+ Enumeration<TuioString> testList = freeStringList.elements();
+ while (testList.hasMoreElements()) {
+ TuioString testString = testList.nextElement();
+ //if (testString.getDistance(tstr)<closestString.getDistance(tstr))
+ closestString = testString;
+ }
+ sl_id = closestString.getStringID();
+ freeStringList.removeElement(closestString);
+ } else maxStringID = sl_id;
+
+ TuioString addString = new TuioString(currentTime,tstr.getSessionID(),sl_id,tstr.getMessage());
+ stringList.put(addString.getSessionID(),addString);
+
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.addTuioString(addString);
+ }
+ break;
+
+ default:
+
+ TuioString updateString = stringList.get(tstr.getSessionID());
+ if ( tstr.getMessage()!=updateString.getMessage() )
+ updateString.update(currentTime,tstr.getMessage());
+ else
+ updateString.update(currentTime,tstr.getMessage());
+
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.updateTuioString(updateString);
+ }
+ }
+ }
+
+ for (int i=0;i<listenerList.size();i++) {
+ TuioListener listener = (TuioListener)listenerList.elementAt(i);
+ if (listener!=null) listener.refresh(new TuioTime(currentTime));
+ }
+
+ Vector<Long> buffer = aliveStringList;
+ aliveStringList = newStringList;
+ // recycling the vector
+ newStringList = buffer;
+ }
+
+ frameStrings.clear();
+ }
+ }
+
+
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/TUIO/TuioContainer.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TUIO/TuioContainer.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
TUIO Java backend - part of the reacTIVision project
http://reactivision.sourceforge.net/
@@ -29,435 +29,435 @@
* @version 1.4
*/
abstract class TuioContainer extends TuioPoint {
-
- /**
- * The unique session ID number that is assigned to each TUIO object or cursor.
- */
- protected long session_id;
- /**
- * The X-axis velocity value.
- */
- protected float x_speed;
- /**
- * The Y-axis velocity value.
- */
- protected float y_speed;
- /**
- * The motion speed value.
- */
- protected float motion_speed;
- /**
- * The motion acceleration value.
- */
- protected float motion_accel;
- /**
- * A Vector of TuioPoints containing all the previous positions of the TUIO component.
- */
- protected Vector<TuioPoint> path;
- /**
- * Defines the ADDED state.
- */
- public static final int TUIO_ADDED = 0;
- /**
- * Defines the ACCELERATING state.
- */
- public static final int TUIO_ACCELERATING = 1;
- /**
- * Defines the DECELERATING state.
- */
- public static final int TUIO_DECELERATING = 2;
- /**
- * Defines the STOPPED state.
- */
- public static final int TUIO_STOPPED = 3;
- /**
- * Defines the REMOVED state.
- */
- public static final int TUIO_REMOVED = 4;
- /**
- * Reflects the current state of the TuioComponent
- */
- protected int state;
-
- /**
- * This constructor takes a TuioTime argument and assigns it along with the provided
- * Session ID, X and Y coordinate to the newly created TuioContainer.
- *
- * @param ttime the TuioTime to assign
- * @param si the Session ID to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- */
- TuioContainer(TuioTime ttime, long si, float xp, float yp) {
- super(ttime,xp,yp);
-
- session_id = si;
- x_speed = 0.0f;
- y_speed = 0.0f;
- motion_speed = 0.0f;
- motion_accel = 0.0f;
-
- path = new Vector<TuioPoint>();
- path.addElement(new TuioPoint(currentTime,xpos,ypos));
- state = TUIO_ADDED;
- }
-
- /**
- * This constructor takes a TuioTime argument and assigns it along with the provided
- * Session ID, X, Y and Z coordinate to the newly created TuioContainer.
- *
- * @param ttime the TuioTime to assign
- * @param si the Session ID to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- */
- TuioContainer(TuioTime ttime, long si, float xp, float yp, float zp) {
- super(ttime,xp,yp, zp);
-
- session_id = si;
- x_speed = 0.0f;
- y_speed = 0.0f;
- motion_speed = 0.0f;
- motion_accel = 0.0f;
-
- path = new Vector<TuioPoint>();
- path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
- state = TUIO_ADDED;
- }
-
- /**
- * This constructor takes the provided Session ID, X and Y coordinate
- * and assigs these values to the newly created TuioContainer.
- *
- * @param si the Session ID to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- */
- TuioContainer(long si, float xp, float yp) {
- super(xp,yp);
-
- session_id = si;
- x_speed = 0.0f;
- y_speed = 0.0f;
- motion_speed = 0.0f;
- motion_accel = 0.0f;
-
- path = new Vector<TuioPoint>();
- path.addElement(new TuioPoint(currentTime,xpos,ypos));
- state = TUIO_ADDED;
- }
-
- /**
- * This constructor takes the provided Session ID, X, Y and Z coordinate
- * and assigs these values to the newly created TuioContainer.
- *
- * @param si the Session ID to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- */
- TuioContainer(long si, float xp, float yp, float zp) {
- super(xp,yp,zp);
-
- session_id = si;
- x_speed = 0.0f;
- y_speed = 0.0f;
- motion_speed = 0.0f;
- motion_accel = 0.0f;
-
- path = new Vector<TuioPoint>();
- path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
- state = TUIO_ADDED;
- }
-
- /**
- * This constructor takes the atttibutes of the provided TuioContainer
- * and assigs these values to the newly created TuioContainer.
- *
- * @param tcon the TuioContainer to assign
- */
- TuioContainer(TuioContainer tcon) {
- super(tcon);
-
- session_id = tcon.getSessionID();
- x_speed = 0.0f;
- y_speed = 0.0f;
- motion_speed = 0.0f;
- motion_accel = 0.0f;
-
- path = new Vector<TuioPoint>();
- path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
- state = TUIO_ADDED;
- }
-
- /**
- * Takes a TuioTime argument and assigns it along with the provided
- * X and Y coordinate to the private TuioContainer attributes.
- * The speed and accleration values are calculated accordingly.
- *
- * @param ttime the TuioTime to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- */
- public void update(TuioTime ttime, float xp, float yp) {
- TuioPoint lastPoint = path.lastElement();
- super.update(ttime,xp,yp);
-
- TuioTime diffTime = currentTime.subtract(lastPoint.getTuioTime());
- float dt = diffTime.getTotalMilliseconds()/1000.0f;
- float dx = this.xpos - lastPoint.getX();
- float dy = this.ypos - lastPoint.getY();
- float dist = (float)Math.sqrt(dx*dx+dy*dy);
- float last_motion_speed = this.motion_speed;
-
- this.x_speed = dx/dt;
- this.y_speed = dy/dt;
- this.motion_speed = dist/dt;
- this.motion_accel = (motion_speed - last_motion_speed)/dt;
-
- path.addElement(new TuioPoint(currentTime,xpos,ypos));
- if (motion_accel>0) state = TUIO_ACCELERATING;
- else if (motion_accel<0) state = TUIO_DECELERATING;
- else state = TUIO_STOPPED;
- }
-
- /**
- * Takes a TuioTime argument and assigns it along with the provided
- * X, Y and Z coordinate to the private TuioContainer attributes.
- * The speed and accleration values are calculated accordingly.
- *
- * @param ttime the TuioTime to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- */
- public void update(TuioTime ttime, float xp, float yp, float zp) {
- TuioPoint lastPoint = path.lastElement();
- super.update(ttime,xp,yp,zp);
-
- TuioTime diffTime = currentTime.subtract(lastPoint.getTuioTime());
- float dt = diffTime.getTotalMilliseconds()/1000.0f;
- float dx = this.xpos - lastPoint.getX();
- float dy = this.ypos - lastPoint.getY();
- float dz = this.zpos - lastPoint.getZ();
- float dist = (float)Math.sqrt(dx*dx+dy*dy+dz*dz);
- float last_motion_speed = this.motion_speed;
-
- this.x_speed = dx/dt;
- this.y_speed = dy/dt;
- this.motion_speed = dist/dt;
- this.motion_accel = (motion_speed - last_motion_speed)/dt;
-
- path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
- if (motion_accel>0) state = TUIO_ACCELERATING;
- else if (motion_accel<0) state = TUIO_DECELERATING;
- else state = TUIO_STOPPED;
- }
-
- /**
- * This method is used to calculate the speed and acceleration values of
- * TuioContainers with unchanged positions.
- */
- public void stop(TuioTime ttime) {
- update(ttime,xpos,ypos,zpos);
- }
-
- /**
- * Takes a TuioTime argument and assigns it along with the provided
- * X and Y coordinate, X and Y velocity and acceleration
- * to the private TuioContainer attributes.
- *
- * @param ttime the TuioTime to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param xs the X velocity to assign
- * @param ys the Y velocity to assign
- * @param ma the acceleration to assign
- */
- public void update(TuioTime ttime, float xp, float yp , float xs, float ys, float ma) {
- super.update(ttime,xp,yp);
- x_speed = xs;
- y_speed = ys;
- motion_speed = (float)Math.sqrt(x_speed*x_speed+y_speed*y_speed);
- motion_accel = ma;
- path.addElement(new TuioPoint(currentTime,xpos,ypos));
- if (motion_accel>0) state = TUIO_ACCELERATING;
- else if (motion_accel<0) state = TUIO_DECELERATING;
- else state = TUIO_STOPPED;
- }
-
- /**
- * Takes a TuioTime argument and assigns it along with the provided
- * X, Y and Z coordinate, X and Y velocity and acceleration
- * to the private TuioContainer attributes.
- *
- * @param ttime the TuioTime to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- * @param xs the X velocity to assign
- * @param ys the Y velocity to assign
- * @param ma the acceleration to assign
- */
- public void update(TuioTime ttime, float xp, float yp, float zp , float xs, float ys, float ma) {
- super.update(ttime,xp,yp,zp);
- x_speed = xs;
- y_speed = ys;
- motion_speed = (float)Math.sqrt(x_speed*x_speed+y_speed*y_speed);
- motion_accel = ma;
- path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
- if (motion_accel>0) state = TUIO_ACCELERATING;
- else if (motion_accel<0) state = TUIO_DECELERATING;
- else state = TUIO_STOPPED;
- }
-
- /**
- * Assigns the provided X and Y coordinate, X and Y velocity and acceleration
- * to the private TuioContainer attributes. The TuioTime time stamp remains unchanged.
- *
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param xs the X velocity to assign
- * @param ys the Y velocity to assign
- * @param ma the acceleration to assign
- */
- public void update(float xp, float yp,float xs,float ys,float ma) {
- super.update(xp,yp);
- x_speed = xs;
- y_speed = ys;
- motion_speed = (float)Math.sqrt(x_speed*x_speed+y_speed*y_speed);
- motion_accel = ma;
- path.addElement(new TuioPoint(currentTime,xpos,ypos));
- if (motion_accel>0) state = TUIO_ACCELERATING;
- else if (motion_accel<0) state = TUIO_DECELERATING;
- else state = TUIO_STOPPED;
- }
-
- /**
- * Assigns the provided X, Y and Z coordinate, X and Y velocity and acceleration
- * to the private TuioContainer attributes. The TuioTime time stamp remains unchanged.
- *
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- * @param xs the X velocity to assign
- * @param ys the Y velocity to assign
- * @param ma the acceleration to assign
- */
- public void update(float xp, float yp, float zp,float xs,float ys,float ma) {
- super.update(xp,yp,zp);
- x_speed = xs;
- y_speed = ys;
- motion_speed = (float)Math.sqrt(x_speed*x_speed+y_speed*y_speed);
- motion_accel = ma;
- path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
- if (motion_accel>0) state = TUIO_ACCELERATING;
- else if (motion_accel<0) state = TUIO_DECELERATING;
- else state = TUIO_STOPPED;
- }
-
- /**
- * Takes the atttibutes of the provided TuioContainer
- * and assigs these values to this TuioContainer.
- * The TuioTime time stamp of this TuioContainer remains unchanged.
- *
- * @param tcon the TuioContainer to assign
- */
- public void update (TuioContainer tcon) {
- super.update(tcon);
- x_speed = tcon.getXSpeed();
- y_speed = tcon.getYSpeed();
- motion_speed = tcon.getMotionSpeed();
- motion_accel = tcon.getMotionAccel();
- path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
- if (motion_accel>0) state = TUIO_ACCELERATING;
- else if (motion_accel<0) state = TUIO_DECELERATING;
- else state = TUIO_STOPPED;
- }
-
- /**
- * Assigns the REMOVE state to this TuioContainer and sets
- * its TuioTime time stamp to the provided TuioTime argument.
- *
- * @param ttime the TuioTime to assign
- */
- public void remove(TuioTime ttime) {
- currentTime = new TuioTime(ttime);
- state = TUIO_REMOVED;
- }
-
- /**
- * Returns the Session ID of this TuioContainer.
- * @return the Session ID of this TuioContainer
- */
- public long getSessionID() {
- return session_id;
- }
-
- /**
- * Returns the X velocity of this TuioContainer.
- * @return the X velocity of this TuioContainer
- */
- public float getXSpeed() {
- return x_speed;
- }
-
- /**
- * Returns the Y velocity of this TuioContainer.
- * @return the Y velocity of this TuioContainer
- */
- public float getYSpeed() {
- return y_speed;
- }
-
- /**
- * Returns the position of this TuioContainer.
- * @return the position of this TuioContainer
- */
- public TuioPoint getPosition() {
- return new TuioPoint(xpos,ypos,zpos);
- }
-
- /**
- * Returns the path of this TuioContainer.
- * @return the path of this TuioContainer
- */
- public Vector<TuioPoint> getPath() {
- return path;
- }
-
- /**
- * Returns the motion speed of this TuioContainer.
- * @return the motion speed of this TuioContainer
- */
- public float getMotionSpeed() {
- return motion_speed;
- }
-
- /**
- * Returns the motion acceleration of this TuioContainer.
- * @return the motion acceleration of this TuioContainer
- */
- public float getMotionAccel() {
- return motion_accel;
- }
-
- /**
- * Returns the TUIO state of this TuioContainer.
- * @return the TUIO state of this TuioContainer
- */
- public int getTuioState() {
- return state;
- }
-
- /**
- * Returns true of this TuioContainer is moving.
- * @return true of this TuioContainer is moving
- */
- public boolean isMoving() {
- if ((state==TUIO_ACCELERATING) || (state==TUIO_DECELERATING)) return true;
- else return false;
- }
-
+
+ /**
+ * The unique session ID number that is assigned to each TUIO object or cursor.
+ */
+ protected long session_id;
+ /**
+ * The X-axis velocity value.
+ */
+ protected float x_speed;
+ /**
+ * The Y-axis velocity value.
+ */
+ protected float y_speed;
+ /**
+ * The motion speed value.
+ */
+ protected float motion_speed;
+ /**
+ * The motion acceleration value.
+ */
+ protected float motion_accel;
+ /**
+ * A Vector of TuioPoints containing all the previous positions of the TUIO component.
+ */
+ protected Vector<TuioPoint> path;
+ /**
+ * Defines the ADDED state.
+ */
+ public static final int TUIO_ADDED = 0;
+ /**
+ * Defines the ACCELERATING state.
+ */
+ public static final int TUIO_ACCELERATING = 1;
+ /**
+ * Defines the DECELERATING state.
+ */
+ public static final int TUIO_DECELERATING = 2;
+ /**
+ * Defines the STOPPED state.
+ */
+ public static final int TUIO_STOPPED = 3;
+ /**
+ * Defines the REMOVED state.
+ */
+ public static final int TUIO_REMOVED = 4;
+ /**
+ * Reflects the current state of the TuioComponent
+ */
+ protected int state;
+
+ /**
+ * This constructor takes a TuioTime argument and assigns it along with the provided
+ * Session ID, X and Y coordinate to the newly created TuioContainer.
+ *
+ * @param ttime the TuioTime to assign
+ * @param si the Session ID to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ */
+ TuioContainer(TuioTime ttime, long si, float xp, float yp) {
+ super(ttime,xp,yp);
+
+ session_id = si;
+ x_speed = 0.0f;
+ y_speed = 0.0f;
+ motion_speed = 0.0f;
+ motion_accel = 0.0f;
+
+ path = new Vector<TuioPoint>();
+ path.addElement(new TuioPoint(currentTime,xpos,ypos));
+ state = TUIO_ADDED;
+ }
+
+ /**
+ * This constructor takes a TuioTime argument and assigns it along with the provided
+ * Session ID, X, Y and Z coordinate to the newly created TuioContainer.
+ *
+ * @param ttime the TuioTime to assign
+ * @param si the Session ID to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ */
+ TuioContainer(TuioTime ttime, long si, float xp, float yp, float zp) {
+ super(ttime,xp,yp, zp);
+
+ session_id = si;
+ x_speed = 0.0f;
+ y_speed = 0.0f;
+ motion_speed = 0.0f;
+ motion_accel = 0.0f;
+
+ path = new Vector<TuioPoint>();
+ path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
+ state = TUIO_ADDED;
+ }
+
+ /**
+ * This constructor takes the provided Session ID, X and Y coordinate
+ * and assigs these values to the newly created TuioContainer.
+ *
+ * @param si the Session ID to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ */
+ TuioContainer(long si, float xp, float yp) {
+ super(xp,yp);
+
+ session_id = si;
+ x_speed = 0.0f;
+ y_speed = 0.0f;
+ motion_speed = 0.0f;
+ motion_accel = 0.0f;
+
+ path = new Vector<TuioPoint>();
+ path.addElement(new TuioPoint(currentTime,xpos,ypos));
+ state = TUIO_ADDED;
+ }
+
+ /**
+ * This constructor takes the provided Session ID, X, Y and Z coordinate
+ * and assigs these values to the newly created TuioContainer.
+ *
+ * @param si the Session ID to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ */
+ TuioContainer(long si, float xp, float yp, float zp) {
+ super(xp,yp,zp);
+
+ session_id = si;
+ x_speed = 0.0f;
+ y_speed = 0.0f;
+ motion_speed = 0.0f;
+ motion_accel = 0.0f;
+
+ path = new Vector<TuioPoint>();
+ path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
+ state = TUIO_ADDED;
+ }
+
+ /**
+ * This constructor takes the atttibutes of the provided TuioContainer
+ * and assigs these values to the newly created TuioContainer.
+ *
+ * @param tcon the TuioContainer to assign
+ */
+ TuioContainer(TuioContainer tcon) {
+ super(tcon);
+
+ session_id = tcon.getSessionID();
+ x_speed = 0.0f;
+ y_speed = 0.0f;
+ motion_speed = 0.0f;
+ motion_accel = 0.0f;
+
+ path = new Vector<TuioPoint>();
+ path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
+ state = TUIO_ADDED;
+ }
+
+ /**
+ * Takes a TuioTime argument and assigns it along with the provided
+ * X and Y coordinate to the private TuioContainer attributes.
+ * The speed and accleration values are calculated accordingly.
+ *
+ * @param ttime the TuioTime to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ */
+ public void update(TuioTime ttime, float xp, float yp) {
+ TuioPoint lastPoint = path.lastElement();
+ super.update(ttime,xp,yp);
+
+ TuioTime diffTime = currentTime.subtract(lastPoint.getTuioTime());
+ float dt = diffTime.getTotalMilliseconds()/1000.0f;
+ float dx = this.xpos - lastPoint.getX();
+ float dy = this.ypos - lastPoint.getY();
+ float dist = (float)Math.sqrt(dx*dx+dy*dy);
+ float last_motion_speed = this.motion_speed;
+
+ this.x_speed = dx/dt;
+ this.y_speed = dy/dt;
+ this.motion_speed = dist/dt;
+ this.motion_accel = (motion_speed - last_motion_speed)/dt;
+
+ path.addElement(new TuioPoint(currentTime,xpos,ypos));
+ if (motion_accel>0) state = TUIO_ACCELERATING;
+ else if (motion_accel<0) state = TUIO_DECELERATING;
+ else state = TUIO_STOPPED;
+ }
+
+ /**
+ * Takes a TuioTime argument and assigns it along with the provided
+ * X, Y and Z coordinate to the private TuioContainer attributes.
+ * The speed and accleration values are calculated accordingly.
+ *
+ * @param ttime the TuioTime to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ */
+ public void update(TuioTime ttime, float xp, float yp, float zp) {
+ TuioPoint lastPoint = path.lastElement();
+ super.update(ttime,xp,yp,zp);
+
+ TuioTime diffTime = currentTime.subtract(lastPoint.getTuioTime());
+ float dt = diffTime.getTotalMilliseconds()/1000.0f;
+ float dx = this.xpos - lastPoint.getX();
+ float dy = this.ypos - lastPoint.getY();
+ float dz = this.zpos - lastPoint.getZ();
+ float dist = (float)Math.sqrt(dx*dx+dy*dy+dz*dz);
+ float last_motion_speed = this.motion_speed;
+
+ this.x_speed = dx/dt;
+ this.y_speed = dy/dt;
+ this.motion_speed = dist/dt;
+ this.motion_accel = (motion_speed - last_motion_speed)/dt;
+
+ path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
+ if (motion_accel>0) state = TUIO_ACCELERATING;
+ else if (motion_accel<0) state = TUIO_DECELERATING;
+ else state = TUIO_STOPPED;
+ }
+
+ /**
+ * This method is used to calculate the speed and acceleration values of
+ * TuioContainers with unchanged positions.
+ */
+ public void stop(TuioTime ttime) {
+ update(ttime,xpos,ypos,zpos);
+ }
+
+ /**
+ * Takes a TuioTime argument and assigns it along with the provided
+ * X and Y coordinate, X and Y velocity and acceleration
+ * to the private TuioContainer attributes.
+ *
+ * @param ttime the TuioTime to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param xs the X velocity to assign
+ * @param ys the Y velocity to assign
+ * @param ma the acceleration to assign
+ */
+ public void update(TuioTime ttime, float xp, float yp , float xs, float ys, float ma) {
+ super.update(ttime,xp,yp);
+ x_speed = xs;
+ y_speed = ys;
+ motion_speed = (float)Math.sqrt(x_speed*x_speed+y_speed*y_speed);
+ motion_accel = ma;
+ path.addElement(new TuioPoint(currentTime,xpos,ypos));
+ if (motion_accel>0) state = TUIO_ACCELERATING;
+ else if (motion_accel<0) state = TUIO_DECELERATING;
+ else state = TUIO_STOPPED;
+ }
+
+ /**
+ * Takes a TuioTime argument and assigns it along with the provided
+ * X, Y and Z coordinate, X and Y velocity and acceleration
+ * to the private TuioContainer attributes.
+ *
+ * @param ttime the TuioTime to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ * @param xs the X velocity to assign
+ * @param ys the Y velocity to assign
+ * @param ma the acceleration to assign
+ */
+ public void update(TuioTime ttime, float xp, float yp, float zp , float xs, float ys, float ma) {
+ super.update(ttime,xp,yp,zp);
+ x_speed = xs;
+ y_speed = ys;
+ motion_speed = (float)Math.sqrt(x_speed*x_speed+y_speed*y_speed);
+ motion_accel = ma;
+ path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
+ if (motion_accel>0) state = TUIO_ACCELERATING;
+ else if (motion_accel<0) state = TUIO_DECELERATING;
+ else state = TUIO_STOPPED;
+ }
+
+ /**
+ * Assigns the provided X and Y coordinate, X and Y velocity and acceleration
+ * to the private TuioContainer attributes. The TuioTime time stamp remains unchanged.
+ *
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param xs the X velocity to assign
+ * @param ys the Y velocity to assign
+ * @param ma the acceleration to assign
+ */
+ public void update(float xp, float yp,float xs,float ys,float ma) {
+ super.update(xp,yp);
+ x_speed = xs;
+ y_speed = ys;
+ motion_speed = (float)Math.sqrt(x_speed*x_speed+y_speed*y_speed);
+ motion_accel = ma;
+ path.addElement(new TuioPoint(currentTime,xpos,ypos));
+ if (motion_accel>0) state = TUIO_ACCELERATING;
+ else if (motion_accel<0) state = TUIO_DECELERATING;
+ else state = TUIO_STOPPED;
+ }
+
+ /**
+ * Assigns the provided X, Y and Z coordinate, X and Y velocity and acceleration
+ * to the private TuioContainer attributes. The TuioTime time stamp remains unchanged.
+ *
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ * @param xs the X velocity to assign
+ * @param ys the Y velocity to assign
+ * @param ma the acceleration to assign
+ */
+ public void update(float xp, float yp, float zp,float xs,float ys,float ma) {
+ super.update(xp,yp,zp);
+ x_speed = xs;
+ y_speed = ys;
+ motion_speed = (float)Math.sqrt(x_speed*x_speed+y_speed*y_speed);
+ motion_accel = ma;
+ path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
+ if (motion_accel>0) state = TUIO_ACCELERATING;
+ else if (motion_accel<0) state = TUIO_DECELERATING;
+ else state = TUIO_STOPPED;
+ }
+
+ /**
+ * Takes the atttibutes of the provided TuioContainer
+ * and assigs these values to this TuioContainer.
+ * The TuioTime time stamp of this TuioContainer remains unchanged.
+ *
+ * @param tcon the TuioContainer to assign
+ */
+ public void update (TuioContainer tcon) {
+ super.update(tcon);
+ x_speed = tcon.getXSpeed();
+ y_speed = tcon.getYSpeed();
+ motion_speed = tcon.getMotionSpeed();
+ motion_accel = tcon.getMotionAccel();
+ path.addElement(new TuioPoint(currentTime,xpos,ypos,zpos));
+ if (motion_accel>0) state = TUIO_ACCELERATING;
+ else if (motion_accel<0) state = TUIO_DECELERATING;
+ else state = TUIO_STOPPED;
+ }
+
+ /**
+ * Assigns the REMOVE state to this TuioContainer and sets
+ * its TuioTime time stamp to the provided TuioTime argument.
+ *
+ * @param ttime the TuioTime to assign
+ */
+ public void remove(TuioTime ttime) {
+ currentTime = new TuioTime(ttime);
+ state = TUIO_REMOVED;
+ }
+
+ /**
+ * Returns the Session ID of this TuioContainer.
+ * @return the Session ID of this TuioContainer
+ */
+ public long getSessionID() {
+ return session_id;
+ }
+
+ /**
+ * Returns the X velocity of this TuioContainer.
+ * @return the X velocity of this TuioContainer
+ */
+ public float getXSpeed() {
+ return x_speed;
+ }
+
+ /**
+ * Returns the Y velocity of this TuioContainer.
+ * @return the Y velocity of this TuioContainer
+ */
+ public float getYSpeed() {
+ return y_speed;
+ }
+
+ /**
+ * Returns the position of this TuioContainer.
+ * @return the position of this TuioContainer
+ */
+ public TuioPoint getPosition() {
+ return new TuioPoint(xpos,ypos,zpos);
+ }
+
+ /**
+ * Returns the path of this TuioContainer.
+ * @return the path of this TuioContainer
+ */
+ public Vector<TuioPoint> getPath() {
+ return path;
+ }
+
+ /**
+ * Returns the motion speed of this TuioContainer.
+ * @return the motion speed of this TuioContainer
+ */
+ public float getMotionSpeed() {
+ return motion_speed;
+ }
+
+ /**
+ * Returns the motion acceleration of this TuioContainer.
+ * @return the motion acceleration of this TuioContainer
+ */
+ public float getMotionAccel() {
+ return motion_accel;
+ }
+
+ /**
+ * Returns the TUIO state of this TuioContainer.
+ * @return the TUIO state of this TuioContainer
+ */
+ public int getTuioState() {
+ return state;
+ }
+
+ /**
+ * Returns true of this TuioContainer is moving.
+ * @return true of this TuioContainer is moving
+ */
+ public boolean isMoving() {
+ if ((state==TUIO_ACCELERATING) || (state==TUIO_DECELERATING)) return true;
+ else return false;
+ }
+
}
--- a/front_processing/extern/TUIO_JAVA/src/TUIO/TuioCursor.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TUIO/TuioCursor.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,8 +1,8 @@
-/*
- TUIO Java backend - part of the reacTIVision project
- http://reactivision.sourceforge.net/
+/*
+ TUIO Java backend - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,88 +28,88 @@
*/
public class TuioCursor extends TuioContainer {
- /**
- * The individual cursor ID number that is assigned to each TuioCursor.
- */
- protected int cursor_id;
-
- /**
- * This constructor takes a TuioTime argument and assigns it along with the provided
- * Session ID, Cursor ID, X and Y coordinate to the newly created TuioCursor.
- *
- * @param ttime the TuioTime to assign
- * @param si the Session ID to assign
- * @param ci the Cursor ID to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- */
- public TuioCursor (TuioTime ttime, long si, int ci, float xp, float yp) {
- super(ttime, si,xp,yp);
- this.cursor_id = ci;
- }
-
- /**
- * This constructor takes a TuioTime argument and assigns it along with the provided
- * Session ID, Cursor ID, X, Y and Z coordinate to the newly created TuioCursor.
- *
- * @param ttime the TuioTime to assign
- * @param si the Session ID to assign
- * @param ci the Cursor ID to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- */
- public TuioCursor (TuioTime ttime, long si, int ci, float xp, float yp, float zp) {
- super(ttime, si,xp,yp,zp);
- this.cursor_id = ci;
- }
-
- /**
- * This constructor takes the provided Session ID, Cursor ID, X and Y coordinate
- * and assigs these values to the newly created TuioCursor.
- *
- * @param si the Session ID to assign
- * @param ci the Cursor ID to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- */
- public TuioCursor (long si, int ci, float xp, float yp) {
- super(si,xp,yp);
- this.cursor_id = ci;
- }
-
- /**
- * This constructor takes the provided Session ID, Cursor ID, X, Y and Z coordinate
- * and assigs these values to the newly created TuioCursor.
- *
- * @param si the Session ID to assign
- * @param ci the Cursor ID to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- */
- public TuioCursor (long si, int ci, float xp, float yp, float zp) {
- super(si,xp,yp,zp);
- this.cursor_id = ci;
- }
+ /**
+ * The individual cursor ID number that is assigned to each TuioCursor.
+ */
+ protected int cursor_id;
+
+ /**
+ * This constructor takes a TuioTime argument and assigns it along with the provided
+ * Session ID, Cursor ID, X and Y coordinate to the newly created TuioCursor.
+ *
+ * @param ttime the TuioTime to assign
+ * @param si the Session ID to assign
+ * @param ci the Cursor ID to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ */
+ public TuioCursor (TuioTime ttime, long si, int ci, float xp, float yp) {
+ super(ttime, si,xp,yp);
+ this.cursor_id = ci;
+ }
+
+ /**
+ * This constructor takes a TuioTime argument and assigns it along with the provided
+ * Session ID, Cursor ID, X, Y and Z coordinate to the newly created TuioCursor.
+ *
+ * @param ttime the TuioTime to assign
+ * @param si the Session ID to assign
+ * @param ci the Cursor ID to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ */
+ public TuioCursor (TuioTime ttime, long si, int ci, float xp, float yp, float zp) {
+ super(ttime, si,xp,yp,zp);
+ this.cursor_id = ci;
+ }
+
+ /**
+ * This constructor takes the provided Session ID, Cursor ID, X and Y coordinate
+ * and assigs these values to the newly created TuioCursor.
+ *
+ * @param si the Session ID to assign
+ * @param ci the Cursor ID to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ */
+ public TuioCursor (long si, int ci, float xp, float yp) {
+ super(si,xp,yp);
+ this.cursor_id = ci;
+ }
+
+ /**
+ * This constructor takes the provided Session ID, Cursor ID, X, Y and Z coordinate
+ * and assigs these values to the newly created TuioCursor.
+ *
+ * @param si the Session ID to assign
+ * @param ci the Cursor ID to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ */
+ public TuioCursor (long si, int ci, float xp, float yp, float zp) {
+ super(si,xp,yp,zp);
+ this.cursor_id = ci;
+ }
- /**
- * This constructor takes the atttibutes of the provided TuioCursor
- * and assigs these values to the newly created TuioCursor.
- *
- * @param tcur the TuioCursor to assign
- */
- public TuioCursor (TuioCursor tcur) {
- super(tcur);
- this.cursor_id = tcur.getCursorID();
- }
-
- /**
- * Returns the Cursor ID of this TuioCursor.
- * @return the Cursor ID of this TuioCursor
- */
- public int getCursorID() {
- return cursor_id;
- }
-
+ /**
+ * This constructor takes the atttibutes of the provided TuioCursor
+ * and assigs these values to the newly created TuioCursor.
+ *
+ * @param tcur the TuioCursor to assign
+ */
+ public TuioCursor (TuioCursor tcur) {
+ super(tcur);
+ this.cursor_id = tcur.getCursorID();
+ }
+
+ /**
+ * Returns the Cursor ID of this TuioCursor.
+ * @return the Cursor ID of this TuioCursor
+ */
+ public int getCursorID() {
+ return cursor_id;
+ }
+
}
--- a/front_processing/extern/TUIO_JAVA/src/TUIO/TuioListener.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TUIO/TuioListener.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
TUIO Java backend - part of the reacTIVision project
http://reactivision.sourceforge.net/
@@ -38,74 +38,74 @@
* @version 1.4
*/
public interface TuioListener {
-
- /**
- * This callback method is invoked by the TuioClient when a new TuioObject is added to the session.
- *
- * @param tobj the TuioObject reference associated to the addTuioObject event
- */
- public void addTuioObject(TuioObject tobj);
+
+ /**
+ * This callback method is invoked by the TuioClient when a new TuioObject is added to the session.
+ *
+ * @param tobj the TuioObject reference associated to the addTuioObject event
+ */
+ public void addTuioObject(TuioObject tobj);
- /**
- * This callback method is invoked by the TuioClient when an existing TuioObject is updated during the session.
- *
- * @param tobj the TuioObject reference associated to the updateTuioObject event
- */
- public void updateTuioObject(TuioObject tobj);
+ /**
+ * This callback method is invoked by the TuioClient when an existing TuioObject is updated during the session.
+ *
+ * @param tobj the TuioObject reference associated to the updateTuioObject event
+ */
+ public void updateTuioObject(TuioObject tobj);
- /**
- * This callback method is invoked by the TuioClient when an existing TuioObject is removed from the session.
- *
- * @param tobj the TuioObject reference associated to the removeTuioObject event
- */
- public void removeTuioObject(TuioObject tobj);
-
- /**
- * This callback method is invoked by the TuioClient when a new TuioCursor is added to the session.
- *
- * @param tcur the TuioCursor reference associated to the addTuioCursor event
- */
- public void addTuioCursor(TuioCursor tcur);
+ /**
+ * This callback method is invoked by the TuioClient when an existing TuioObject is removed from the session.
+ *
+ * @param tobj the TuioObject reference associated to the removeTuioObject event
+ */
+ public void removeTuioObject(TuioObject tobj);
+
+ /**
+ * This callback method is invoked by the TuioClient when a new TuioCursor is added to the session.
+ *
+ * @param tcur the TuioCursor reference associated to the addTuioCursor event
+ */
+ public void addTuioCursor(TuioCursor tcur);
- /**
- * This callback method is invoked by the TuioClient when an existing TuioCursor is updated during the session.
- *
- * @param tcur the TuioCursor reference associated to the updateTuioCursor event
- */
- public void updateTuioCursor(TuioCursor tcur);
+ /**
+ * This callback method is invoked by the TuioClient when an existing TuioCursor is updated during the session.
+ *
+ * @param tcur the TuioCursor reference associated to the updateTuioCursor event
+ */
+ public void updateTuioCursor(TuioCursor tcur);
- /**
- * This callback method is invoked by the TuioClient when an existing TuioCursor is removed from the session.
- *
- * @param tcur the TuioCursor reference associated to the removeTuioCursor event
- */
- public void removeTuioCursor(TuioCursor tcur);
-
- /**
- * This callback method is invoked by the TuioClient when a new TuioString is added to the session.
- *
- * @param tstr the TuioString reference associated to the addTuioString event
- */
- public void addTuioString(TuioString tstr);
+ /**
+ * This callback method is invoked by the TuioClient when an existing TuioCursor is removed from the session.
+ *
+ * @param tcur the TuioCursor reference associated to the removeTuioCursor event
+ */
+ public void removeTuioCursor(TuioCursor tcur);
+
+ /**
+ * This callback method is invoked by the TuioClient when a new TuioString is added to the session.
+ *
+ * @param tstr the TuioString reference associated to the addTuioString event
+ */
+ public void addTuioString(TuioString tstr);
- /**
- * This callback method is invoked by the TuioClient when an existing TuioString is updated during the session.
- *
- * @param tstr the TuioString reference associated to the updateTuioString event
- */
- public void updateTuioString(TuioString tstr);
+ /**
+ * This callback method is invoked by the TuioClient when an existing TuioString is updated during the session.
+ *
+ * @param tstr the TuioString reference associated to the updateTuioString event
+ */
+ public void updateTuioString(TuioString tstr);
- /**
- * This callback method is invoked by the TuioClient when an existing TuioString is removed from the session.
- *
- * @param tstr the TuioString reference associated to the removeTuioString event
- */
- public void removeTuioString(TuioString tstr);
-
- /**
- * This callback method is invoked by the TuioClient to mark the end of a received TUIO message bundle.
- *
- * @param ftime the TuioTime associated to the current TUIO message bundle
- */
- public void refresh(TuioTime ftime);
+ /**
+ * This callback method is invoked by the TuioClient when an existing TuioString is removed from the session.
+ *
+ * @param tstr the TuioString reference associated to the removeTuioString event
+ */
+ public void removeTuioString(TuioString tstr);
+
+ /**
+ * This callback method is invoked by the TuioClient to mark the end of a received TUIO message bundle.
+ *
+ * @param ftime the TuioTime associated to the current TUIO message bundle
+ */
+ public void refresh(TuioTime ftime);
}
--- a/front_processing/extern/TUIO_JAVA/src/TUIO/TuioObject.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TUIO/TuioObject.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,8 +1,8 @@
-/*
- TUIO Java backend - part of the reacTIVision project
- http://reactivision.sourceforge.net/
+/*
+ TUIO Java backend - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,225 +27,225 @@
* @version 1.4
*/
public class TuioObject extends TuioContainer {
-
- /**
- * The individual symbol ID number that is assigned to each TuioObject.
- */
- protected int symbol_id;
- /**
- * The rotation angle value.
- */
- protected float angle;
- /**
- * The rotation speed value.
- */
- protected float rotation_speed;
- /**
- * The rotation acceleration value.
- */
- protected float rotation_accel;
- /**
- * Defines the ROTATING state.
- */
- public static final int TUIO_ROTATING = 5;
-
- /**
- * This constructor takes a TuioTime argument and assigns it along with the provided
- * Session ID, Symbol ID, X and Y coordinate and angle to the newly created TuioObject.
- *
- * @param ttime the TuioTime to assign
- * @param si the Session ID to assign
- * @param sym the Symbol ID to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param a the angle to assign
- */
- public TuioObject (TuioTime ttime, long si, int sym, float xp, float yp, float a) {
- super(ttime, si,xp,yp);
- symbol_id = sym;
- angle = a;
- rotation_speed = 0.0f;
- rotation_accel = 0.0f;
- }
+
+ /**
+ * The individual symbol ID number that is assigned to each TuioObject.
+ */
+ protected int symbol_id;
+ /**
+ * The rotation angle value.
+ */
+ protected float angle;
+ /**
+ * The rotation speed value.
+ */
+ protected float rotation_speed;
+ /**
+ * The rotation acceleration value.
+ */
+ protected float rotation_accel;
+ /**
+ * Defines the ROTATING state.
+ */
+ public static final int TUIO_ROTATING = 5;
+
+ /**
+ * This constructor takes a TuioTime argument and assigns it along with the provided
+ * Session ID, Symbol ID, X and Y coordinate and angle to the newly created TuioObject.
+ *
+ * @param ttime the TuioTime to assign
+ * @param si the Session ID to assign
+ * @param sym the Symbol ID to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param a the angle to assign
+ */
+ public TuioObject (TuioTime ttime, long si, int sym, float xp, float yp, float a) {
+ super(ttime, si,xp,yp);
+ symbol_id = sym;
+ angle = a;
+ rotation_speed = 0.0f;
+ rotation_accel = 0.0f;
+ }
- /**
- * This constructor takes the provided Session ID, Symbol ID, X and Y coordinate
- * and angle, and assigs these values to the newly created TuioObject.
- *
- * @param si the Session ID to assign
- * @param sym the Symbol ID to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param a the angle to assign
- */
- public TuioObject (long si, int sym, float xp, float yp, float a) {
- super(si,xp,yp);
- symbol_id = sym;
- angle = angle;
- rotation_speed = 0.0f;
- rotation_accel = 0.0f;
- }
+ /**
+ * This constructor takes the provided Session ID, Symbol ID, X and Y coordinate
+ * and angle, and assigs these values to the newly created TuioObject.
+ *
+ * @param si the Session ID to assign
+ * @param sym the Symbol ID to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param a the angle to assign
+ */
+ public TuioObject (long si, int sym, float xp, float yp, float a) {
+ super(si,xp,yp);
+ symbol_id = sym;
+ angle = angle;
+ rotation_speed = 0.0f;
+ rotation_accel = 0.0f;
+ }
- /**
- * This constructor takes the atttibutes of the provided TuioObject
- * and assigs these values to the newly created TuioObject.
- *
- * @param tobj the TuioObject to assign
- */
- public TuioObject (TuioObject tobj) {
- super(tobj);
- symbol_id = tobj.getSymbolID();
- angle = tobj.getAngle();
- rotation_speed = 0.0f;
- rotation_accel = 0.0f;
- }
+ /**
+ * This constructor takes the atttibutes of the provided TuioObject
+ * and assigs these values to the newly created TuioObject.
+ *
+ * @param tobj the TuioObject to assign
+ */
+ public TuioObject (TuioObject tobj) {
+ super(tobj);
+ symbol_id = tobj.getSymbolID();
+ angle = tobj.getAngle();
+ rotation_speed = 0.0f;
+ rotation_accel = 0.0f;
+ }
- /**
- * Takes a TuioTime argument and assigns it along with the provided
- * X and Y coordinate, angle, X and Y velocity, motion acceleration,
- * rotation speed and rotation acceleration to the private TuioObject attributes.
- *
- * @param ttime the TuioTime to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param a the angle coordinate to assign
- * @param xs the X velocity to assign
- * @param ys the Y velocity to assign
- * @param rs the rotation velocity to assign
- * @param ma the motion acceleration to assign
- * @param ra the rotation acceleration to assign
- */
- public void update (TuioTime ttime, float xp, float yp, float a, float xs, float ys, float rs, float ma, float ra) {
- super.update(ttime,xp,yp,xs,ys,ma);
- angle = a;
- rotation_speed = rs;
- rotation_accel = ra;
- if ((rotation_accel!=0) && (state!=TUIO_STOPPED)) state = TUIO_ROTATING;
- }
+ /**
+ * Takes a TuioTime argument and assigns it along with the provided
+ * X and Y coordinate, angle, X and Y velocity, motion acceleration,
+ * rotation speed and rotation acceleration to the private TuioObject attributes.
+ *
+ * @param ttime the TuioTime to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param a the angle coordinate to assign
+ * @param xs the X velocity to assign
+ * @param ys the Y velocity to assign
+ * @param rs the rotation velocity to assign
+ * @param ma the motion acceleration to assign
+ * @param ra the rotation acceleration to assign
+ */
+ public void update (TuioTime ttime, float xp, float yp, float a, float xs, float ys, float rs, float ma, float ra) {
+ super.update(ttime,xp,yp,xs,ys,ma);
+ angle = a;
+ rotation_speed = rs;
+ rotation_accel = ra;
+ if ((rotation_accel!=0) && (state!=TUIO_STOPPED)) state = TUIO_ROTATING;
+ }
- /**
- * Assigns the provided X and Y coordinate, angle, X and Y velocity, motion acceleration
- * rotation velocity and rotation acceleration to the private TuioContainer attributes.
- * The TuioTime time stamp remains unchanged.
- *
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param a the angle coordinate to assign
- * @param xs the X velocity to assign
- * @param ys the Y velocity to assign
- * @param rs the rotation velocity to assign
- * @param ma the motion acceleration to assign
- * @param ra the rotation acceleration to assign
- */
- public void update (float xp, float yp, float a, float xs, float ys, float rs, float ma, float ra) {
- super.update(xp,yp,xs,ys,ma);
- angle = a;
- rotation_speed = rs;
- rotation_accel = ra;
- if ((rotation_accel!=0) && (state!=TUIO_STOPPED)) state = TUIO_ROTATING;
- }
-
- /**
- * Takes a TuioTime argument and assigns it along with the provided
- * X and Y coordinate and angle to the private TuioObject attributes.
- * The speed and accleration values are calculated accordingly.
- *
- * @param ttime the TuioTime to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param a the angle coordinate to assign
- */
- public void update (TuioTime ttime, float xp, float yp, float a) {
- TuioPoint lastPoint = path.lastElement();
- super.update(ttime,xp,yp);
+ /**
+ * Assigns the provided X and Y coordinate, angle, X and Y velocity, motion acceleration
+ * rotation velocity and rotation acceleration to the private TuioContainer attributes.
+ * The TuioTime time stamp remains unchanged.
+ *
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param a the angle coordinate to assign
+ * @param xs the X velocity to assign
+ * @param ys the Y velocity to assign
+ * @param rs the rotation velocity to assign
+ * @param ma the motion acceleration to assign
+ * @param ra the rotation acceleration to assign
+ */
+ public void update (float xp, float yp, float a, float xs, float ys, float rs, float ma, float ra) {
+ super.update(xp,yp,xs,ys,ma);
+ angle = a;
+ rotation_speed = rs;
+ rotation_accel = ra;
+ if ((rotation_accel!=0) && (state!=TUIO_STOPPED)) state = TUIO_ROTATING;
+ }
+
+ /**
+ * Takes a TuioTime argument and assigns it along with the provided
+ * X and Y coordinate and angle to the private TuioObject attributes.
+ * The speed and accleration values are calculated accordingly.
+ *
+ * @param ttime the TuioTime to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param a the angle coordinate to assign
+ */
+ public void update (TuioTime ttime, float xp, float yp, float a) {
+ TuioPoint lastPoint = path.lastElement();
+ super.update(ttime,xp,yp);
- TuioTime diffTime = currentTime.subtract(lastPoint.getTuioTime());
- float dt = diffTime.getTotalMilliseconds()/1000.0f;
- float last_angle = angle;
- float last_rotation_speed = rotation_speed;
- angle = a;
-
- float da = (this.angle-last_angle)/(2.0f*(float)Math.PI);
- if (da>0.75f) da-=1.0f;
- else if (da<-0.75f) da+=1.0f;
-
- rotation_speed = da/dt;
- rotation_accel = (rotation_speed - last_rotation_speed)/dt;
- if ((rotation_accel!=0) && (state!=TUIO_STOPPED)) state = TUIO_ROTATING;
- }
-
- /**
- * Takes the atttibutes of the provided TuioObject
- * and assigs these values to this TuioObject.
- * The TuioTime time stamp of this TuioContainer remains unchanged.
- *
- * @param tobj the TuioContainer to assign
- */
- public void update (TuioObject tobj) {
- super.update(tobj);
- angle = tobj.getAngle();
- rotation_speed = tobj.getRotationSpeed();
- rotation_accel = tobj.getRotationAccel();
- if ((rotation_accel!=0) && (state!=TUIO_STOPPED)) state = TUIO_ROTATING;
- }
-
- /**
- * This method is used to calculate the speed and acceleration values of a
- * TuioObject with unchanged position and angle.
- *
- * @param ttime the TuioTime to assign
- */
- public void stop (TuioTime ttime) {
- update(ttime,xpos,ypos, angle);
- }
+ TuioTime diffTime = currentTime.subtract(lastPoint.getTuioTime());
+ float dt = diffTime.getTotalMilliseconds()/1000.0f;
+ float last_angle = angle;
+ float last_rotation_speed = rotation_speed;
+ angle = a;
+
+ float da = (this.angle-last_angle)/(2.0f*(float)Math.PI);
+ if (da>0.75f) da-=1.0f;
+ else if (da<-0.75f) da+=1.0f;
+
+ rotation_speed = da/dt;
+ rotation_accel = (rotation_speed - last_rotation_speed)/dt;
+ if ((rotation_accel!=0) && (state!=TUIO_STOPPED)) state = TUIO_ROTATING;
+ }
+
+ /**
+ * Takes the atttibutes of the provided TuioObject
+ * and assigs these values to this TuioObject.
+ * The TuioTime time stamp of this TuioContainer remains unchanged.
+ *
+ * @param tobj the TuioContainer to assign
+ */
+ public void update (TuioObject tobj) {
+ super.update(tobj);
+ angle = tobj.getAngle();
+ rotation_speed = tobj.getRotationSpeed();
+ rotation_accel = tobj.getRotationAccel();
+ if ((rotation_accel!=0) && (state!=TUIO_STOPPED)) state = TUIO_ROTATING;
+ }
+
+ /**
+ * This method is used to calculate the speed and acceleration values of a
+ * TuioObject with unchanged position and angle.
+ *
+ * @param ttime the TuioTime to assign
+ */
+ public void stop (TuioTime ttime) {
+ update(ttime,xpos,ypos, angle);
+ }
- /**
- * Returns the symbol ID of this TuioObject.
- * @return the symbol ID of this TuioObject
- */
- public int getSymbolID() {
- return symbol_id;
- }
-
- /**
- * Returns the rotation angle of this TuioObject.
- * @return the rotation angle of this TuioObject
- */
- public float getAngle() {
- return angle;
- }
+ /**
+ * Returns the symbol ID of this TuioObject.
+ * @return the symbol ID of this TuioObject
+ */
+ public int getSymbolID() {
+ return symbol_id;
+ }
+
+ /**
+ * Returns the rotation angle of this TuioObject.
+ * @return the rotation angle of this TuioObject
+ */
+ public float getAngle() {
+ return angle;
+ }
- /**
- * Returns the rotation angle in degrees of this TuioObject.
- * @return the rotation angle in degrees of this TuioObject
- */
- public float getAngleDegrees() {
- return angle/(float)Math.PI*180.0f;
- }
-
- /**
- * Returns the rotation speed of this TuioObject.
- * @return the rotation speed of this TuioObject
- */
- public float getRotationSpeed() {
- return rotation_speed;
- }
-
- /**
- * Returns the rotation acceleration of this TuioObject.
- * @return the rotation acceleration of this TuioObject
- */
- public float getRotationAccel() {
- return rotation_accel;
- }
+ /**
+ * Returns the rotation angle in degrees of this TuioObject.
+ * @return the rotation angle in degrees of this TuioObject
+ */
+ public float getAngleDegrees() {
+ return angle/(float)Math.PI*180.0f;
+ }
+
+ /**
+ * Returns the rotation speed of this TuioObject.
+ * @return the rotation speed of this TuioObject
+ */
+ public float getRotationSpeed() {
+ return rotation_speed;
+ }
+
+ /**
+ * Returns the rotation acceleration of this TuioObject.
+ * @return the rotation acceleration of this TuioObject
+ */
+ public float getRotationAccel() {
+ return rotation_accel;
+ }
- /**
- * Returns true of this TuioObject is moving.
- * @return true of this TuioObject is moving
- */
- public boolean isMoving() {
- if ((state==TUIO_ACCELERATING) || (state==TUIO_DECELERATING) || (state==TUIO_ROTATING)) return true;
- else return false;
- }
-
+ /**
+ * Returns true of this TuioObject is moving.
+ * @return true of this TuioObject is moving
+ */
+ public boolean isMoving() {
+ if ((state==TUIO_ACCELERATING) || (state==TUIO_DECELERATING) || (state==TUIO_ROTATING)) return true;
+ else return false;
+ }
+
}
--- a/front_processing/extern/TUIO_JAVA/src/TUIO/TuioPoint.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TUIO/TuioPoint.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,8 +1,8 @@
-/*
- TUIO Java backend - part of the reacTIVision project
- http://reactivision.sourceforge.net/
+/*
+ TUIO Java backend - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,335 +29,335 @@
* @version 1.4
*/
public class TuioPoint {
-
- public String comm;
-
- /**
- * X coordinate, representated as a floating point value in a range of 0..1
- */
- protected float xpos;
- /**
- * Y coordinate, representated as a floating point value in a range of 0..1
- */
- protected float ypos;
- /**
- * Z coordinate, representated as a floating point value in a range of 0..1
- */
- protected float zpos;
- /**
- * The time stamp of the last update represented as TuioTime (time since session start)
- */
- protected TuioTime currentTime;
- /**
- * The creation time of this TuioPoint represented as TuioTime (time since session start)
- */
- protected TuioTime startTime;
-
- /**
- * The default constructor takes no arguments and sets
- * its coordinate attributes to zero and its time stamp to the current session time.
- */
- public TuioPoint() {
- xpos = 0.0f;
- ypos = 0.0f;
- zpos = 0.0f;
- currentTime = TuioTime.getSessionTime();
- startTime = new TuioTime(currentTime);
- }
-
- /**
- * This constructor takes two floating point coordinate arguments and sets
- * its coordinate attributes to these values and its time stamp to the current session time.
- *
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- */
- public TuioPoint(float xp, float yp) {
- xpos = xp;
- ypos = yp;
- zpos = 0.0f;
- currentTime = TuioTime.getSessionTime();
- startTime = new TuioTime(currentTime);
- }
-
- /**
- * This constructor takes three floating point coordinate arguments and sets
- * its coordinate attributes to these values and its time stamp to the current session time.
- *
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- */
- public TuioPoint(float xp, float yp, float zp) {
- xpos = xp;
- ypos = yp;
- zpos = zp;
- currentTime = TuioTime.getSessionTime();
- startTime = new TuioTime(currentTime);
- }
+
+ public String comm;
+
+ /**
+ * X coordinate, representated as a floating point value in a range of 0..1
+ */
+ protected float xpos;
+ /**
+ * Y coordinate, representated as a floating point value in a range of 0..1
+ */
+ protected float ypos;
+ /**
+ * Z coordinate, representated as a floating point value in a range of 0..1
+ */
+ protected float zpos;
+ /**
+ * The time stamp of the last update represented as TuioTime (time since session start)
+ */
+ protected TuioTime currentTime;
+ /**
+ * The creation time of this TuioPoint represented as TuioTime (time since session start)
+ */
+ protected TuioTime startTime;
+
+ /**
+ * The default constructor takes no arguments and sets
+ * its coordinate attributes to zero and its time stamp to the current session time.
+ */
+ public TuioPoint() {
+ xpos = 0.0f;
+ ypos = 0.0f;
+ zpos = 0.0f;
+ currentTime = TuioTime.getSessionTime();
+ startTime = new TuioTime(currentTime);
+ }
+
+ /**
+ * This constructor takes two floating point coordinate arguments and sets
+ * its coordinate attributes to these values and its time stamp to the current session time.
+ *
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ */
+ public TuioPoint(float xp, float yp) {
+ xpos = xp;
+ ypos = yp;
+ zpos = 0.0f;
+ currentTime = TuioTime.getSessionTime();
+ startTime = new TuioTime(currentTime);
+ }
+
+ /**
+ * This constructor takes three floating point coordinate arguments and sets
+ * its coordinate attributes to these values and its time stamp to the current session time.
+ *
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ */
+ public TuioPoint(float xp, float yp, float zp) {
+ xpos = xp;
+ ypos = yp;
+ zpos = zp;
+ currentTime = TuioTime.getSessionTime();
+ startTime = new TuioTime(currentTime);
+ }
- /**
- * This constructor takes a TuioPoint argument and sets its coordinate attributes
- * to the coordinates of the provided TuioPoint and its time stamp to the current session time.
- *
- * @param tpoint the TuioPoint to assign
- */
- public TuioPoint(TuioPoint tpoint) {
- xpos = tpoint.getX();
- ypos = tpoint.getY();
- zpos = tpoint.getZ();
- currentTime = TuioTime.getSessionTime();
- startTime = new TuioTime(currentTime);
- }
-
- /**
- * This constructor takes a TuioTime object and two floating point coordinate arguments and sets
- * its coordinate attributes to these values and its time stamp to the provided TUIO time object.
- *
- * @param ttime the TuioTime to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- */
- public TuioPoint(TuioTime ttime, float xp, float yp) {
- xpos = xp;
- ypos = yp;
- zpos = 0.0f;
- currentTime = new TuioTime(ttime);
- startTime = new TuioTime(currentTime);
- }
-
- /**
- * This constructor takes a TuioTime object and three floating point coordinate arguments and sets
- * its coordinate attributes to these values and its time stamp to the provided TUIO time object.
- *
- * @param ttime the TuioTime to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- */
- public TuioPoint(TuioTime ttime, float xp, float yp, float zp) {
- xpos = xp;
- ypos = yp;
- zpos = zp;
- currentTime = new TuioTime(ttime);
- startTime = new TuioTime(currentTime);
- }
-
- /**
- * Takes a TuioPoint argument and updates its coordinate attributes
- * to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.
- *
- * @param tpoint the TuioPoint to assign
- */
- public void update(TuioPoint tpoint) {
- xpos = tpoint.getX();
- ypos = tpoint.getY();
- zpos = tpoint.getZ();
- }
+ /**
+ * This constructor takes a TuioPoint argument and sets its coordinate attributes
+ * to the coordinates of the provided TuioPoint and its time stamp to the current session time.
+ *
+ * @param tpoint the TuioPoint to assign
+ */
+ public TuioPoint(TuioPoint tpoint) {
+ xpos = tpoint.getX();
+ ypos = tpoint.getY();
+ zpos = tpoint.getZ();
+ currentTime = TuioTime.getSessionTime();
+ startTime = new TuioTime(currentTime);
+ }
+
+ /**
+ * This constructor takes a TuioTime object and two floating point coordinate arguments and sets
+ * its coordinate attributes to these values and its time stamp to the provided TUIO time object.
+ *
+ * @param ttime the TuioTime to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ */
+ public TuioPoint(TuioTime ttime, float xp, float yp) {
+ xpos = xp;
+ ypos = yp;
+ zpos = 0.0f;
+ currentTime = new TuioTime(ttime);
+ startTime = new TuioTime(currentTime);
+ }
+
+ /**
+ * This constructor takes a TuioTime object and three floating point coordinate arguments and sets
+ * its coordinate attributes to these values and its time stamp to the provided TUIO time object.
+ *
+ * @param ttime the TuioTime to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ */
+ public TuioPoint(TuioTime ttime, float xp, float yp, float zp) {
+ xpos = xp;
+ ypos = yp;
+ zpos = zp;
+ currentTime = new TuioTime(ttime);
+ startTime = new TuioTime(currentTime);
+ }
+
+ /**
+ * Takes a TuioPoint argument and updates its coordinate attributes
+ * to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.
+ *
+ * @param tpoint the TuioPoint to assign
+ */
+ public void update(TuioPoint tpoint) {
+ xpos = tpoint.getX();
+ ypos = tpoint.getY();
+ zpos = tpoint.getZ();
+ }
- /**
- * Takes two floating point coordinate arguments and updates its coordinate attributes
- * to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.
- *
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- */
- public void update(float xp, float yp) {
- xpos = xp;
- ypos = yp;
- }
-
- /**
- * Takes three floating point coordinate arguments and updates its coordinate attributes
- * to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.
- *
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- */
- public void update(float xp, float yp, float zp) {
- xpos = xp;
- ypos = yp;
- zpos = zp;
- }
-
- /**
- * Takes a TuioTime object and two floating point coordinate arguments and updates its coordinate attributes
- * to the coordinates of the provided TuioPoint and its time stamp to the provided TUIO time object.
- *
- * @param ttime the TuioTime to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- */
- public void update(TuioTime ttime, float xp, float yp) {
- xpos = xp;
- ypos = yp;
- currentTime = new TuioTime(ttime);
- }
-
- /**
- * Takes a TuioTime object and three floating point coordinate arguments and updates its coordinate attributes
- * to the coordinates of the provided TuioPoint and its time stamp to the provided TUIO time object.
- *
- * @param ttime the TuioTime to assign
- * @param xp the X coordinate to assign
- * @param yp the Y coordinate to assign
- * @param zp the Z coordinate to assign
- */
- public void update(TuioTime ttime, float xp, float yp, float zp) {
- xpos = xp;
- ypos = yp;
- zpos = zp;
- currentTime = new TuioTime(ttime);
- }
-
- /**
- * Returns the X coordinate of this TuioPoint.
- * @return the X coordinate of this TuioPoint
- */
- public float getX() {
- return xpos;
- }
-
- /**
- * Returns the Y coordinate of this TuioPoint.
- * @return the Y coordinate of this TuioPoint
- */
- public float getY() {
- return ypos;
- }
-
- /**
- * Returns the Z coordinate of this TuioPoint.
- * @return the Z coordinate of this TuioPoint
- */
- public float getZ() {
- return zpos;
- }
-
- /**
- * Returns the distance to the provided coordinates
- *
- * @param xp the X coordinate of the distant point
- * @param yp the Y coordinate of the distant point
- * @return the distance to the provided coordinates
- */
- public float getDistance(float xp, float yp) {
- float dx = xpos-xp;
- float dy = ypos-yp;
- return (float)Math.sqrt(dx*dx+dy*dy);
- }
-
- /**
- * Returns the distance to the provided coordinates
- *
- * @param xp the X coordinate of the distant point
- * @param yp the Y coordinate of the distant point
- * @param zp the Y coordinate of the distant point
- * @return the distance to the provided coordinates
- */
- public float getDistance(float xp, float yp, float zp) {
- float dx = xpos-xp;
- float dy = ypos-yp;
- float dz = zpos-zp;
- return (float)Math.sqrt(dx*dx+dy*dy+dz*dz);
- }
+ /**
+ * Takes two floating point coordinate arguments and updates its coordinate attributes
+ * to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.
+ *
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ */
+ public void update(float xp, float yp) {
+ xpos = xp;
+ ypos = yp;
+ }
+
+ /**
+ * Takes three floating point coordinate arguments and updates its coordinate attributes
+ * to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.
+ *
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ */
+ public void update(float xp, float yp, float zp) {
+ xpos = xp;
+ ypos = yp;
+ zpos = zp;
+ }
+
+ /**
+ * Takes a TuioTime object and two floating point coordinate arguments and updates its coordinate attributes
+ * to the coordinates of the provided TuioPoint and its time stamp to the provided TUIO time object.
+ *
+ * @param ttime the TuioTime to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ */
+ public void update(TuioTime ttime, float xp, float yp) {
+ xpos = xp;
+ ypos = yp;
+ currentTime = new TuioTime(ttime);
+ }
+
+ /**
+ * Takes a TuioTime object and three floating point coordinate arguments and updates its coordinate attributes
+ * to the coordinates of the provided TuioPoint and its time stamp to the provided TUIO time object.
+ *
+ * @param ttime the TuioTime to assign
+ * @param xp the X coordinate to assign
+ * @param yp the Y coordinate to assign
+ * @param zp the Z coordinate to assign
+ */
+ public void update(TuioTime ttime, float xp, float yp, float zp) {
+ xpos = xp;
+ ypos = yp;
+ zpos = zp;
+ currentTime = new TuioTime(ttime);
+ }
+
+ /**
+ * Returns the X coordinate of this TuioPoint.
+ * @return the X coordinate of this TuioPoint
+ */
+ public float getX() {
+ return xpos;
+ }
+
+ /**
+ * Returns the Y coordinate of this TuioPoint.
+ * @return the Y coordinate of this TuioPoint
+ */
+ public float getY() {
+ return ypos;
+ }
+
+ /**
+ * Returns the Z coordinate of this TuioPoint.
+ * @return the Z coordinate of this TuioPoint
+ */
+ public float getZ() {
+ return zpos;
+ }
+
+ /**
+ * Returns the distance to the provided coordinates
+ *
+ * @param xp the X coordinate of the distant point
+ * @param yp the Y coordinate of the distant point
+ * @return the distance to the provided coordinates
+ */
+ public float getDistance(float xp, float yp) {
+ float dx = xpos-xp;
+ float dy = ypos-yp;
+ return (float)Math.sqrt(dx*dx+dy*dy);
+ }
+
+ /**
+ * Returns the distance to the provided coordinates
+ *
+ * @param xp the X coordinate of the distant point
+ * @param yp the Y coordinate of the distant point
+ * @param zp the Y coordinate of the distant point
+ * @return the distance to the provided coordinates
+ */
+ public float getDistance(float xp, float yp, float zp) {
+ float dx = xpos-xp;
+ float dy = ypos-yp;
+ float dz = zpos-zp;
+ return (float)Math.sqrt(dx*dx+dy*dy+dz*dz);
+ }
- /**
- * Returns the distance to the provided TuioPoint
- *
- * @param tpoint the distant TuioPoint
- * @return the distance to the provided TuioPoint
- */
- public float getDistance(TuioPoint tpoint) {
- return getDistance(tpoint.getX(),tpoint.getY(), tpoint.getZ());
- }
+ /**
+ * Returns the distance to the provided TuioPoint
+ *
+ * @param tpoint the distant TuioPoint
+ * @return the distance to the provided TuioPoint
+ */
+ public float getDistance(TuioPoint tpoint) {
+ return getDistance(tpoint.getX(),tpoint.getY(), tpoint.getZ());
+ }
- /**
- * Returns the angle to the provided coordinates
- *
- * @param xp the X coordinate of the distant point
- * @param yp the Y coordinate of the distant point
- * @return the angle to the provided coordinates
- */
- public float getAngle(float xp, float yp) {
-
- float side = xpos-xp;
- float height = ypos-yp;
- float distance = getDistance(xp,yp);
-
- float angle = (float)(Math.asin(side/distance)+Math.PI/2);
- if (height<0) angle = 2.0f*(float)Math.PI-angle;
-
- return angle;
- }
-
- /**
- * Returns the angle to the provided TuioPoint
- *
- * @param tpoint the distant TuioPoint
- * @return the angle to the provided TuioPoint
- */
- public float getAngle(TuioPoint tpoint) {
- return getAngle(tpoint.getX(),tpoint.getY());
- }
+ /**
+ * Returns the angle to the provided coordinates
+ *
+ * @param xp the X coordinate of the distant point
+ * @param yp the Y coordinate of the distant point
+ * @return the angle to the provided coordinates
+ */
+ public float getAngle(float xp, float yp) {
+
+ float side = xpos-xp;
+ float height = ypos-yp;
+ float distance = getDistance(xp,yp);
+
+ float angle = (float)(Math.asin(side/distance)+Math.PI/2);
+ if (height<0) angle = 2.0f*(float)Math.PI-angle;
+
+ return angle;
+ }
+
+ /**
+ * Returns the angle to the provided TuioPoint
+ *
+ * @param tpoint the distant TuioPoint
+ * @return the angle to the provided TuioPoint
+ */
+ public float getAngle(TuioPoint tpoint) {
+ return getAngle(tpoint.getX(),tpoint.getY());
+ }
- /**
- * Returns the angle in degrees to the provided coordinates
- *
- * @param xp the X coordinate of the distant point
- * @param yp the Y coordinate of the distant point
- * @return the angle in degrees to the provided TuioPoint
- */
- public float getAngleDegrees(float xp, float yp) {
- return (getAngle(xp,yp)/(float)Math.PI)*180.0f;
- }
-
- /**
- * Returns the angle in degrees to the provided TuioPoint
- *
- * @param tpoint the distant TuioPoint
- * @return the angle in degrees to the provided TuioPoint
- */
- public float getAngleDegrees(TuioPoint tpoint) {
- return (getAngle(tpoint)/(float)Math.PI)*180.0f;
- }
-
- /**
- * Returns the X coordinate in pixels relative to the provided screen width.
- *
- * @param width the screen width
- * @return the X coordinate of this TuioPoint in pixels relative to the provided screen width
- */
- public int getScreenX(int width) {
- return (int)Math.round(xpos*width);
- }
-
- /**
- * Returns the Y coordinate in pixels relative to the provided screen height.
- *
- * @param height the screen height
- * @return the Y coordinate of this TuioPoint in pixels relative to the provided screen height
- */
- public int getScreenY(int height) {
- return (int)Math.round(ypos*height);
- }
-
- /**
- * Returns the time stamp of this TuioPoint as TuioTime.
- *
- * @return the time stamp of this TuioPoint as TuioTime
- */
- public TuioTime getTuioTime() {
- return new TuioTime(currentTime);
- }
-
- /**
- * Returns the start time of this TuioPoint as TuioTime.
- *
- * @return the start time of this TuioPoint as TuioTime
- */
- public TuioTime getStartTime() {
- return new TuioTime(startTime);
- }
+ /**
+ * Returns the angle in degrees to the provided coordinates
+ *
+ * @param xp the X coordinate of the distant point
+ * @param yp the Y coordinate of the distant point
+ * @return the angle in degrees to the provided TuioPoint
+ */
+ public float getAngleDegrees(float xp, float yp) {
+ return (getAngle(xp,yp)/(float)Math.PI)*180.0f;
+ }
+
+ /**
+ * Returns the angle in degrees to the provided TuioPoint
+ *
+ * @param tpoint the distant TuioPoint
+ * @return the angle in degrees to the provided TuioPoint
+ */
+ public float getAngleDegrees(TuioPoint tpoint) {
+ return (getAngle(tpoint)/(float)Math.PI)*180.0f;
+ }
+
+ /**
+ * Returns the X coordinate in pixels relative to the provided screen width.
+ *
+ * @param width the screen width
+ * @return the X coordinate of this TuioPoint in pixels relative to the provided screen width
+ */
+ public int getScreenX(int width) {
+ return (int)Math.round(xpos*width);
+ }
+
+ /**
+ * Returns the Y coordinate in pixels relative to the provided screen height.
+ *
+ * @param height the screen height
+ * @return the Y coordinate of this TuioPoint in pixels relative to the provided screen height
+ */
+ public int getScreenY(int height) {
+ return (int)Math.round(ypos*height);
+ }
+
+ /**
+ * Returns the time stamp of this TuioPoint as TuioTime.
+ *
+ * @return the time stamp of this TuioPoint as TuioTime
+ */
+ public TuioTime getTuioTime() {
+ return new TuioTime(currentTime);
+ }
+
+ /**
+ * Returns the start time of this TuioPoint as TuioTime.
+ *
+ * @return the start time of this TuioPoint as TuioTime
+ */
+ public TuioTime getStartTime() {
+ return new TuioTime(startTime);
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/TUIO/TuioString.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TUIO/TuioString.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
Added by alexandre.bastien@iri.centrepompidou.fr
*/
@@ -10,180 +10,180 @@
*/
public class TuioString {
- /**
- * The unique session ID number that is assigned to each TUIO string.
- */
- protected long session_id;
+ /**
+ * The unique session ID number that is assigned to each TUIO string.
+ */
+ protected long session_id;
- /**
- * The individual string ID number that is assigned to each TuioString.
- */
- protected int string_id;
-
- /**
- * The individual string message that is assigned to each TuioString.
- */
- protected String message;
-
- /**
- * The time stamp of the last update represented as TuioTime (time since session start)
- */
- protected TuioTime currentTime;
- /**
- * The creation time of this TuioString represented as TuioTime (time since session start)
- */
- protected TuioTime startTime;
-
- /**
- * Defines the ADDED state.
- */
- public static final int TUIO_ADDED = 0;
- /**
- * Defines the REMOVED state.
- */
- public static final int TUIO_REMOVED = 4;
- /**
- * Reflects the current state of the TuioString
- */
- protected int state;
-
- /**
- * This constructor takes a TuioTime argument and assigns it along with the provided
- * Session ID, String ID and a message to the newly created TuioString.
- *
- * @param ttime the TuioTime to assign
- * @param si the Session ID to assign
- * @param sti the String ID to assign
- * @param msg the message to assign
- */
- public TuioString (TuioTime ttime, long si, int sti, String msg) {
- this.session_id = si;
- this.string_id = sti;
- this.message = msg;
- currentTime = new TuioTime(ttime);
- startTime = new TuioTime(currentTime);
- }
-
- /**
- * This constructor takes the provided Session ID, String ID and message
- * and assigs these values to the newly created TuioString.
- *
- * @param si the Session ID to assign
- * @param sti the String ID to assign
- * @param msg the message to assign
- */
- public TuioString (long si, int sti, String msg) {
- this.session_id = si;
- this.string_id = sti;
- this.message = msg;
- currentTime = TuioTime.getSessionTime();
- startTime = new TuioTime(currentTime);
- }
-
- /**
- * This constructor takes the atttibutes of the provided TuioCursor
- * and assigs these values to the newly created TuioCursor.
- *
- * @param tcur the TuioCursor to assign
- */
- public TuioString (TuioString tstr) {
- this.session_id = tstr.getSessionID();
- this.string_id = tstr.getStringID();
- this.message = tstr.getMessage();
- currentTime = new TuioTime(tstr.getCurrentTime());
- startTime = new TuioTime(currentTime);
- }
+ /**
+ * The individual string ID number that is assigned to each TuioString.
+ */
+ protected int string_id;
+
+ /**
+ * The individual string message that is assigned to each TuioString.
+ */
+ protected String message;
+
+ /**
+ * The time stamp of the last update represented as TuioTime (time since session start)
+ */
+ protected TuioTime currentTime;
+ /**
+ * The creation time of this TuioString represented as TuioTime (time since session start)
+ */
+ protected TuioTime startTime;
+
+ /**
+ * Defines the ADDED state.
+ */
+ public static final int TUIO_ADDED = 0;
+ /**
+ * Defines the REMOVED state.
+ */
+ public static final int TUIO_REMOVED = 4;
+ /**
+ * Reflects the current state of the TuioString
+ */
+ protected int state;
+
+ /**
+ * This constructor takes a TuioTime argument and assigns it along with the provided
+ * Session ID, String ID and a message to the newly created TuioString.
+ *
+ * @param ttime the TuioTime to assign
+ * @param si the Session ID to assign
+ * @param sti the String ID to assign
+ * @param msg the message to assign
+ */
+ public TuioString (TuioTime ttime, long si, int sti, String msg) {
+ this.session_id = si;
+ this.string_id = sti;
+ this.message = msg;
+ currentTime = new TuioTime(ttime);
+ startTime = new TuioTime(currentTime);
+ }
+
+ /**
+ * This constructor takes the provided Session ID, String ID and message
+ * and assigs these values to the newly created TuioString.
+ *
+ * @param si the Session ID to assign
+ * @param sti the String ID to assign
+ * @param msg the message to assign
+ */
+ public TuioString (long si, int sti, String msg) {
+ this.session_id = si;
+ this.string_id = sti;
+ this.message = msg;
+ currentTime = TuioTime.getSessionTime();
+ startTime = new TuioTime(currentTime);
+ }
+
+ /**
+ * This constructor takes the atttibutes of the provided TuioCursor
+ * and assigs these values to the newly created TuioCursor.
+ *
+ * @param tcur the TuioCursor to assign
+ */
+ public TuioString (TuioString tstr) {
+ this.session_id = tstr.getSessionID();
+ this.string_id = tstr.getStringID();
+ this.message = tstr.getMessage();
+ currentTime = new TuioTime(tstr.getCurrentTime());
+ startTime = new TuioTime(currentTime);
+ }
- /**
- * Takes a TuioTime argument and assigns it along with the provided
- * message to the private TuioString attributes.
- * The speed and accleration values are calculated accordingly.
- *
- * @param ttime the TuioTime to assign
- * @param message2 the message to assign
- */
- public void update(TuioTime ttime, String message2) {
- currentTime = new TuioTime(ttime);
- message = message2;
- }
-
- /**
- * This method is used to update the TuioTime of a TuioString while keeping the same * * * message.
- */
- public void stop(TuioTime ttime) {
- update(ttime,message);
- }
-
- /**
- * Takes the atttibutes of the provided TuioString
- * and assigs these values to this TuioString.
- * The TuioTime time stamp of this TuioString remains unchanged.
- *
- * @param tstr the TuioString to assign
- */
- public void update (TuioString tstr) {
- message = tstr.getMessage();
- }
-
- /**
- * Takes the message provided
- * and assigs its value to this TuioString.
- * The TuioTime time stamp of this TuioString remains unchanged.
- *
- * @param msg the message to assign
- */
- public void update (String msg) {
- message = msg;
- }
-
- /**
- * Assigns the REMOVE state to this TuioString and sets
- * its TuioTime time stamp to the provided TuioTime argument.
- *
- * @param ttime the TuioTime to assign
- */
- public void remove(TuioTime ttime) {
- currentTime = new TuioTime(ttime);
- state = TUIO_REMOVED;
- }
-
- /**
- * Returns the Session ID of this TuioString.
- * @return the Session ID of this TuioString
- */
- public long getSessionID() {
- return session_id;
- }
-
- /**
- * Returns the String ID of this TuioString.
- * @return the String ID of this TuioString
- */
- public int getStringID() {
- return string_id;
- }
-
- /**
- * Returns the Message of this TuioString.
- * @return the Message of this TuioString
- */
- public String getMessage() {
- return message;
- }
-
- /**
- * Returns the Current Time of this TuioString.
- * @return the Current Time of this TuioString
- */
- public TuioTime getCurrentTime() {
- return currentTime;
- }
-
- /**
- * Returns the TUIO state of this TuioString.
- * @return the TUIO state of this TuioString
- */
- public int getTuioState() {
- return state;
- }
+ /**
+ * Takes a TuioTime argument and assigns it along with the provided
+ * message to the private TuioString attributes.
+ * The speed and accleration values are calculated accordingly.
+ *
+ * @param ttime the TuioTime to assign
+ * @param message2 the message to assign
+ */
+ public void update(TuioTime ttime, String message2) {
+ currentTime = new TuioTime(ttime);
+ message = message2;
+ }
+
+ /**
+ * This method is used to update the TuioTime of a TuioString while keeping the same * * * message.
+ */
+ public void stop(TuioTime ttime) {
+ update(ttime,message);
+ }
+
+ /**
+ * Takes the atttibutes of the provided TuioString
+ * and assigs these values to this TuioString.
+ * The TuioTime time stamp of this TuioString remains unchanged.
+ *
+ * @param tstr the TuioString to assign
+ */
+ public void update (TuioString tstr) {
+ message = tstr.getMessage();
+ }
+
+ /**
+ * Takes the message provided
+ * and assigs its value to this TuioString.
+ * The TuioTime time stamp of this TuioString remains unchanged.
+ *
+ * @param msg the message to assign
+ */
+ public void update (String msg) {
+ message = msg;
+ }
+
+ /**
+ * Assigns the REMOVE state to this TuioString and sets
+ * its TuioTime time stamp to the provided TuioTime argument.
+ *
+ * @param ttime the TuioTime to assign
+ */
+ public void remove(TuioTime ttime) {
+ currentTime = new TuioTime(ttime);
+ state = TUIO_REMOVED;
+ }
+
+ /**
+ * Returns the Session ID of this TuioString.
+ * @return the Session ID of this TuioString
+ */
+ public long getSessionID() {
+ return session_id;
+ }
+
+ /**
+ * Returns the String ID of this TuioString.
+ * @return the String ID of this TuioString
+ */
+ public int getStringID() {
+ return string_id;
+ }
+
+ /**
+ * Returns the Message of this TuioString.
+ * @return the Message of this TuioString
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Returns the Current Time of this TuioString.
+ * @return the Current Time of this TuioString
+ */
+ public TuioTime getCurrentTime() {
+ return currentTime;
+ }
+
+ /**
+ * Returns the TUIO state of this TuioString.
+ * @return the TUIO state of this TuioString
+ */
+ public int getTuioState() {
+ return state;
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/TUIO/TuioTime.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TUIO/TuioTime.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,8 +1,8 @@
-/*
- TUIO Java backend - part of the reacTIVision project
- http://reactivision.sourceforge.net/
+/*
+ TUIO Java backend - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,204 +33,204 @@
*/
public class TuioTime {
- /**
- * the time since session start in seconds
- */
- private long seconds = 0;
- /**
- * time fraction in microseconds
- */
- private long micro_seconds = 0;
- /**
- * the session start time in seconds
- */
- private static long start_seconds = 0;
- /**
- * start time fraction in microseconds
- */
- private static long start_micro_seconds = 0;
-
- /**
- * The default constructor takes no arguments and sets
- * the Seconds and Microseconds attributes of the newly created TuioTime both to zero.
- */
- public TuioTime () {
- this.seconds = 0;
- this.micro_seconds = 0;
- }
-
- /**
- * This constructor takes the provided time represented in total Milliseconds
- * and assigs this value to the newly created TuioTime.
- *
- * @param msec the total time in Millseconds
- */
- public TuioTime (long msec) {
- this.seconds = msec/1000;
- this.micro_seconds = 1000*(msec%1000);
- }
-
- /**
- * This constructor takes the provided time represented in Seconds and Microseconds
- * and assigs these value to the newly created TuioTime.
- *
- * @param sec the total time in seconds
- * @param usec the microseconds time component
- */
- public TuioTime (long sec, long usec) {
- this.seconds = sec;
- this.micro_seconds = usec;
- }
+ /**
+ * the time since session start in seconds
+ */
+ private long seconds = 0;
+ /**
+ * time fraction in microseconds
+ */
+ private long micro_seconds = 0;
+ /**
+ * the session start time in seconds
+ */
+ private static long start_seconds = 0;
+ /**
+ * start time fraction in microseconds
+ */
+ private static long start_micro_seconds = 0;
+
+ /**
+ * The default constructor takes no arguments and sets
+ * the Seconds and Microseconds attributes of the newly created TuioTime both to zero.
+ */
+ public TuioTime () {
+ this.seconds = 0;
+ this.micro_seconds = 0;
+ }
+
+ /**
+ * This constructor takes the provided time represented in total Milliseconds
+ * and assigs this value to the newly created TuioTime.
+ *
+ * @param msec the total time in Millseconds
+ */
+ public TuioTime (long msec) {
+ this.seconds = msec/1000;
+ this.micro_seconds = 1000*(msec%1000);
+ }
+
+ /**
+ * This constructor takes the provided time represented in Seconds and Microseconds
+ * and assigs these value to the newly created TuioTime.
+ *
+ * @param sec the total time in seconds
+ * @param usec the microseconds time component
+ */
+ public TuioTime (long sec, long usec) {
+ this.seconds = sec;
+ this.micro_seconds = usec;
+ }
- /**
- * This constructor takes the provided TuioTime
- * and assigs its Seconds and Microseconds values to the newly created TuioTime.
- *
- * @param ttime the TuioTime used to copy
- */
- public TuioTime (TuioTime ttime) {
- this.seconds = ttime.getSeconds();
- this.micro_seconds = ttime.getMicroseconds();
- }
-
- /**
- * Sums the provided time value represented in total Microseconds to this TuioTime.
- *
- * @param us the total time to add in Microseconds
- * @return the sum of this TuioTime with the provided argument in microseconds
- */
- public TuioTime add(long us) {
- long sec = seconds + us/1000000;
- long usec = micro_seconds + us%1000000;
- return new TuioTime(sec,usec);
- }
+ /**
+ * This constructor takes the provided TuioTime
+ * and assigs its Seconds and Microseconds values to the newly created TuioTime.
+ *
+ * @param ttime the TuioTime used to copy
+ */
+ public TuioTime (TuioTime ttime) {
+ this.seconds = ttime.getSeconds();
+ this.micro_seconds = ttime.getMicroseconds();
+ }
+
+ /**
+ * Sums the provided time value represented in total Microseconds to this TuioTime.
+ *
+ * @param us the total time to add in Microseconds
+ * @return the sum of this TuioTime with the provided argument in microseconds
+ */
+ public TuioTime add(long us) {
+ long sec = seconds + us/1000000;
+ long usec = micro_seconds + us%1000000;
+ return new TuioTime(sec,usec);
+ }
- /**
- * Sums the provided TuioTime to the private Seconds and Microseconds attributes.
- *
- * @param ttime the TuioTime to add
- * @return the sum of this TuioTime with the provided TuioTime argument
- */
- public TuioTime add(TuioTime ttime) {
- long sec = seconds + ttime.getSeconds();
- long usec = micro_seconds + ttime.getMicroseconds();
- sec += usec/1000000;
- usec = usec%1000000;
- return new TuioTime(sec,usec);
- }
+ /**
+ * Sums the provided TuioTime to the private Seconds and Microseconds attributes.
+ *
+ * @param ttime the TuioTime to add
+ * @return the sum of this TuioTime with the provided TuioTime argument
+ */
+ public TuioTime add(TuioTime ttime) {
+ long sec = seconds + ttime.getSeconds();
+ long usec = micro_seconds + ttime.getMicroseconds();
+ sec += usec/1000000;
+ usec = usec%1000000;
+ return new TuioTime(sec,usec);
+ }
- /**
- * Subtracts the provided time represented in Microseconds from the private Seconds and Microseconds attributes.
- *
- * @param us the total time to subtract in Microseconds
- * @return the subtraction result of this TuioTime minus the provided time in Microseconds
- */
- public TuioTime subtract(long us) {
- long sec = seconds - us/1000000;
- long usec = micro_seconds - us%1000000;
-
- if (usec<0) {
- usec += 1000000;
- sec--;
- }
-
- return new TuioTime(sec,usec);
- }
+ /**
+ * Subtracts the provided time represented in Microseconds from the private Seconds and Microseconds attributes.
+ *
+ * @param us the total time to subtract in Microseconds
+ * @return the subtraction result of this TuioTime minus the provided time in Microseconds
+ */
+ public TuioTime subtract(long us) {
+ long sec = seconds - us/1000000;
+ long usec = micro_seconds - us%1000000;
+
+ if (usec<0) {
+ usec += 1000000;
+ sec--;
+ }
+
+ return new TuioTime(sec,usec);
+ }
- /**
- * Subtracts the provided TuioTime from the private Seconds and Microseconds attributes.
- *
- * @param ttime the TuioTime to subtract
- * @return the subtraction result of this TuioTime minus the provided TuioTime
- */
- public TuioTime subtract(TuioTime ttime) {
- long sec = seconds - ttime.getSeconds();
- long usec = micro_seconds - ttime.getMicroseconds();
-
- if (usec<0) {
- usec += 1000000;
- sec--;
- }
-
- return new TuioTime(sec,usec);
- }
+ /**
+ * Subtracts the provided TuioTime from the private Seconds and Microseconds attributes.
+ *
+ * @param ttime the TuioTime to subtract
+ * @return the subtraction result of this TuioTime minus the provided TuioTime
+ */
+ public TuioTime subtract(TuioTime ttime) {
+ long sec = seconds - ttime.getSeconds();
+ long usec = micro_seconds - ttime.getMicroseconds();
+
+ if (usec<0) {
+ usec += 1000000;
+ sec--;
+ }
+
+ return new TuioTime(sec,usec);
+ }
- /**
- * Takes a TuioTime argument and compares the provided TuioTime to the private Seconds and Microseconds attributes.
- *
- * @param ttime the TuioTime to compare
- * @return true if the two TuioTime have equal Seconds and Microseconds attributes
- */
- public boolean equals(TuioTime ttime) {
- if ((seconds==ttime.getSeconds()) && (micro_seconds==ttime.getMicroseconds())) return true;
- else return false;
- }
+ /**
+ * Takes a TuioTime argument and compares the provided TuioTime to the private Seconds and Microseconds attributes.
+ *
+ * @param ttime the TuioTime to compare
+ * @return true if the two TuioTime have equal Seconds and Microseconds attributes
+ */
+ public boolean equals(TuioTime ttime) {
+ if ((seconds==ttime.getSeconds()) && (micro_seconds==ttime.getMicroseconds())) return true;
+ else return false;
+ }
- /**
- * Resets the seconds and micro_seconds attributes to zero.
- */
- public void reset() {
- seconds = 0;
- micro_seconds = 0;
- }
+ /**
+ * Resets the seconds and micro_seconds attributes to zero.
+ */
+ public void reset() {
+ seconds = 0;
+ micro_seconds = 0;
+ }
- /**
- * Returns the TuioTime Seconds component.
- * @return the TuioTime Seconds component
- */
- public long getSeconds() {
- return seconds;
- }
+ /**
+ * Returns the TuioTime Seconds component.
+ * @return the TuioTime Seconds component
+ */
+ public long getSeconds() {
+ return seconds;
+ }
- /**
- * Returns the TuioTime Microseconds component.
- * @return the TuioTime Microseconds component
- */
- public long getMicroseconds() {
- return micro_seconds;
- }
+ /**
+ * Returns the TuioTime Microseconds component.
+ * @return the TuioTime Microseconds component
+ */
+ public long getMicroseconds() {
+ return micro_seconds;
+ }
- /**
- * Returns the total TuioTime in Milliseconds.
- * @return the total TuioTime in Milliseconds
- */
- public long getTotalMilliseconds() {
- return seconds*1000+micro_seconds/1000;
- }
+ /**
+ * Returns the total TuioTime in Milliseconds.
+ * @return the total TuioTime in Milliseconds
+ */
+ public long getTotalMilliseconds() {
+ return seconds*1000+micro_seconds/1000;
+ }
- /**
- * This static method globally resets the TUIO session time.
- */
- public static void initSession() {
- TuioTime startTime = getSystemTime();
- start_seconds = startTime.getSeconds();
- start_micro_seconds = startTime.getMicroseconds();
- }
+ /**
+ * This static method globally resets the TUIO session time.
+ */
+ public static void initSession() {
+ TuioTime startTime = getSystemTime();
+ start_seconds = startTime.getSeconds();
+ start_micro_seconds = startTime.getMicroseconds();
+ }
- /**
- * Returns the present TuioTime representing the time since session start.
- * @return the present TuioTime representing the time since session start
- */
- public static TuioTime getSessionTime() {
- TuioTime sessionTime = getSystemTime().subtract(getStartTime());
- return sessionTime;
-
- }
+ /**
+ * Returns the present TuioTime representing the time since session start.
+ * @return the present TuioTime representing the time since session start
+ */
+ public static TuioTime getSessionTime() {
+ TuioTime sessionTime = getSystemTime().subtract(getStartTime());
+ return sessionTime;
+
+ }
- /**
- * Returns the absolut TuioTime representing the session start.
- * @return the absolut TuioTime representing the session start
- */
- public static TuioTime getStartTime() {
- return new TuioTime(start_seconds,start_micro_seconds);
- }
-
- /**
- * Returns the absolut TuioTime representing the current system time.
- * @return the absolut TuioTime representing the current system time
- */
- public static TuioTime getSystemTime() {
- long usec = System.nanoTime()/1000;
- return new TuioTime(usec/1000000,usec%1000000);
- }
+ /**
+ * Returns the absolut TuioTime representing the session start.
+ * @return the absolut TuioTime representing the session start
+ */
+ public static TuioTime getStartTime() {
+ return new TuioTime(start_seconds,start_micro_seconds);
+ }
+
+ /**
+ * Returns the absolut TuioTime representing the current system time.
+ * @return the absolut TuioTime representing the current system time
+ */
+ public static TuioTime getSystemTime() {
+ long usec = System.nanoTime()/1000;
+ return new TuioTime(usec/1000000,usec%1000000);
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/TuioApplet.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TuioApplet.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,22 +1,22 @@
-/*
- TUIO Java Demo - part of the reacTIVision project
- http://reactivision.sourceforge.net/
-
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+/*
+ TUIO Java Demo - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
+
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import java.applet.*;
@@ -27,41 +27,41 @@
import TUIO.*;
public class TuioApplet extends JApplet {
-
- TuioDemoComponent demo;
- TuioClient client;
- int port = 3333;
-
- public void init() {
- try {
- port = Integer.parseInt(getParameter("port"));
- } catch (Exception e) {}
-
- Dimension size = this.getSize();
-
- TuioDemoComponent demo = new TuioDemoComponent();
- demo.setSize(size.width,size.height);
-
- client = new TuioClient();
- client.addTuioListener(demo);
-
- add(demo);
- repaint();
- }
+
+ TuioDemoComponent demo;
+ TuioClient client;
+ int port = 3333;
+
+ public void init() {
+ try {
+ port = Integer.parseInt(getParameter("port"));
+ } catch (Exception e) {}
+
+ Dimension size = this.getSize();
+
+ TuioDemoComponent demo = new TuioDemoComponent();
+ demo.setSize(size.width,size.height);
+
+ client = new TuioClient();
+ client.addTuioListener(demo);
+
+ add(demo);
+ repaint();
+ }
- public void start() {
- if (!client.isConnected()) client.connect();
- }
+ public void start() {
+ if (!client.isConnected()) client.connect();
+ }
- public void stop() {
- if (client.isConnected()) client.disconnect();
- }
+ public void stop() {
+ if (client.isConnected()) client.disconnect();
+ }
- public void destroy() {
- if (client.isConnected()) client.disconnect();
- client = null;
- }
+ public void destroy() {
+ if (client.isConnected()) client.disconnect();
+ client = null;
+ }
- public void paint( Graphics g ) {
- }
+ public void paint( Graphics g ) {
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/TuioDemo.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TuioDemo.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,8 +1,8 @@
-/*
- TUIO Java Demo - part of the reacTIVision project
- http://reactivision.sourceforge.net/
+/*
+ TUIO Java Demo - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,115 +29,115 @@
public class TuioDemo {
- private final int window_width = 640;
- private final int window_height = 480;
+ private final int window_width = 640;
+ private final int window_height = 480;
- private boolean fullscreen = false;
-
- private TuioDemoComponent demo;
- private JFrame frame;
- private GraphicsDevice device;
-
- public TuioDemo() {
- demo = new TuioDemoComponent();
- device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
- setupWindow();
- showWindow();
- }
-
- public TuioListener getTuioListener() {
- return demo;
- }
-
- public void setupWindow() {
-
- frame = new JFrame();
- frame.add(demo);
+ private boolean fullscreen = false;
+
+ private TuioDemoComponent demo;
+ private JFrame frame;
+ private GraphicsDevice device;
+
+ public TuioDemo() {
+ demo = new TuioDemoComponent();
+ device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
+ setupWindow();
+ showWindow();
+ }
+
+ public TuioListener getTuioListener() {
+ return demo;
+ }
+
+ public void setupWindow() {
+
+ frame = new JFrame();
+ frame.add(demo);
- frame.setTitle("TuioDemo");
- frame.setResizable(false);
+ frame.setTitle("TuioDemo");
+ frame.setResizable(false);
- frame.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent evt) {
- System.exit(0);
- } });
-
- frame.addKeyListener( new KeyAdapter() { public void keyPressed(KeyEvent evt) {
- if (evt.getKeyCode()==KeyEvent.VK_ESCAPE) System.exit(0);
- else if (evt.getKeyCode()==KeyEvent.VK_F1) {
- destroyWindow();
- setupWindow();
- fullscreen = !fullscreen;
- showWindow();
- }
- else if (evt.getKeyCode()==KeyEvent.VK_V) demo.verbose=!demo.verbose;
- } });
- }
-
- public void destroyWindow() {
-
- frame.setVisible(false);
- if (fullscreen) {
- device.setFullScreenWindow(null);
- }
- frame = null;
- }
-
- public void showWindow() {
-
- if (fullscreen) {
- int width = (int)Toolkit.getDefaultToolkit().getScreenSize().getWidth();
- int height = (int)Toolkit.getDefaultToolkit().getScreenSize().getHeight();
- demo.setSize(width,height);
+ frame.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent evt) {
+ System.exit(0);
+ } });
+
+ frame.addKeyListener( new KeyAdapter() { public void keyPressed(KeyEvent evt) {
+ if (evt.getKeyCode()==KeyEvent.VK_ESCAPE) System.exit(0);
+ else if (evt.getKeyCode()==KeyEvent.VK_F1) {
+ destroyWindow();
+ setupWindow();
+ fullscreen = !fullscreen;
+ showWindow();
+ }
+ else if (evt.getKeyCode()==KeyEvent.VK_V) demo.verbose=!demo.verbose;
+ } });
+ }
+
+ public void destroyWindow() {
+
+ frame.setVisible(false);
+ if (fullscreen) {
+ device.setFullScreenWindow(null);
+ }
+ frame = null;
+ }
+
+ public void showWindow() {
+
+ if (fullscreen) {
+ int width = (int)Toolkit.getDefaultToolkit().getScreenSize().getWidth();
+ int height = (int)Toolkit.getDefaultToolkit().getScreenSize().getHeight();
+ demo.setSize(width,height);
- frame.setSize(width,height);
- frame.setUndecorated(true);
- device.setFullScreenWindow(frame);
- } else {
- int width = window_width;
- int height = window_height;
- demo.setSize(width,height);
-
- frame.pack();
- Insets insets = frame.getInsets();
- frame.setSize(width,height +insets.top);
-
- }
-
- frame.setVisible(true);
- frame.repaint();
+ frame.setSize(width,height);
+ frame.setUndecorated(true);
+ device.setFullScreenWindow(frame);
+ } else {
+ int width = window_width;
+ int height = window_height;
+ demo.setSize(width,height);
+
+ frame.pack();
+ Insets insets = frame.getInsets();
+ frame.setSize(width,height +insets.top);
+
+ }
+
+ frame.setVisible(true);
+ frame.repaint();
- }
-
- public static void main(String argv[]) {
-
- TuioDemo demo = new TuioDemo();
- TuioClient client = null;
+ }
+
+ public static void main(String argv[]) {
+
+ TuioDemo demo = new TuioDemo();
+ TuioClient client = null;
- switch (argv.length) {
- case 1:
- try {
- client = new TuioClient( Integer.parseInt(argv[0]));
- } catch (Exception e) {
- System.out.println("usage: java TuioDemo [port]");
- System.exit(0);
- }
- break;
- case 0:
- client = new TuioClient(80);
- break;
- default:
- System.out.println("usage: java TuioDemo [port]");
- System.exit(0);
- break;
- }
-
- if (client!=null) {
- client.addTuioListener(demo.getTuioListener());
- client.connect();
- } else {
- System.out.println("usage: java TuioDemo [port]");
- System.exit(0);
- }
- }
-
+ switch (argv.length) {
+ case 1:
+ try {
+ client = new TuioClient( Integer.parseInt(argv[0]));
+ } catch (Exception e) {
+ System.out.println("usage: java TuioDemo [port]");
+ System.exit(0);
+ }
+ break;
+ case 0:
+ client = new TuioClient(80);
+ break;
+ default:
+ System.out.println("usage: java TuioDemo [port]");
+ System.exit(0);
+ break;
+ }
+
+ if (client!=null) {
+ client.addTuioListener(demo.getTuioListener());
+ client.connect();
+ } else {
+ System.out.println("usage: java TuioDemo [port]");
+ System.exit(0);
+ }
+ }
+
}
--- a/front_processing/extern/TUIO_JAVA/src/TuioDemoComponent.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TuioDemoComponent.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,22 +1,22 @@
-/*
- TUIO Java Demo - part of the reacTIVision project
- http://reactivision.sourceforge.net/
+/*
+ TUIO Java Demo - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import java.awt.*;
@@ -29,154 +29,154 @@
public class TuioDemoComponent extends JComponent implements TuioListener {
- private Hashtable<Long,TuioDemoObject> objectList = new Hashtable<Long,TuioDemoObject>();
- private Hashtable<Long,TuioCursor> cursorList = new Hashtable<Long,TuioCursor>();
- private Hashtable<Long,TuioString> stringList = new Hashtable<Long,TuioString>();
+ private Hashtable<Long,TuioDemoObject> objectList = new Hashtable<Long,TuioDemoObject>();
+ private Hashtable<Long,TuioCursor> cursorList = new Hashtable<Long,TuioCursor>();
+ private Hashtable<Long,TuioString> stringList = new Hashtable<Long,TuioString>();
- public static final int finger_size = 15;
- public static final int object_size = 60;
- public static final int table_size = 760;
-
- public static int width, height;
- private float scale = 1.0f;
- public boolean verbose = false;
-
- public void setSize(int w, int h) {
- super.setSize(w,h);
- width = w;
- height = h;
- scale = height/(float)TuioDemoComponent.table_size;
- }
-
- public void addTuioObject(TuioObject tobj) {
- TuioDemoObject demo = new TuioDemoObject(tobj);
- objectList.put(tobj.getSessionID(),demo);
+ public static final int finger_size = 15;
+ public static final int object_size = 60;
+ public static final int table_size = 760;
+
+ public static int width, height;
+ private float scale = 1.0f;
+ public boolean verbose = false;
+
+ public void setSize(int w, int h) {
+ super.setSize(w,h);
+ width = w;
+ height = h;
+ scale = height/(float)TuioDemoComponent.table_size;
+ }
+
+ public void addTuioObject(TuioObject tobj) {
+ TuioDemoObject demo = new TuioDemoObject(tobj);
+ objectList.put(tobj.getSessionID(),demo);
- if (verbose)
- System.out.println("add obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle());
- }
+ if (verbose)
+ System.out.println("add obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle());
+ }
- public void updateTuioObject(TuioObject tobj) {
+ public void updateTuioObject(TuioObject tobj) {
- TuioDemoObject demo = (TuioDemoObject)objectList.get(tobj.getSessionID());
- demo.update(tobj);
-
- if (verbose)
- System.out.println("set obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle()+" "+tobj.getMotionSpeed()+" "+tobj.getRotationSpeed()+" "+tobj.getMotionAccel()+" "+tobj.getRotationAccel());
- }
-
- public void removeTuioObject(TuioObject tobj) {
- objectList.remove(tobj.getSessionID());
-
- if (verbose)
- System.out.println("del obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+")");
- }
+ TuioDemoObject demo = (TuioDemoObject)objectList.get(tobj.getSessionID());
+ demo.update(tobj);
+
+ if (verbose)
+ System.out.println("set obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle()+" "+tobj.getMotionSpeed()+" "+tobj.getRotationSpeed()+" "+tobj.getMotionAccel()+" "+tobj.getRotationAccel());
+ }
+
+ public void removeTuioObject(TuioObject tobj) {
+ objectList.remove(tobj.getSessionID());
+
+ if (verbose)
+ System.out.println("del obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+")");
+ }
- public void addTuioCursor(TuioCursor tcur) {
-
- if (!cursorList.containsKey(tcur.getSessionID())) {
- cursorList.put(tcur.getSessionID(), tcur);
- repaint();
- }
-
- if (verbose)
- System.out.println("add cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+") "+tcur.getX()+" "+tcur.getY());
- }
+ public void addTuioCursor(TuioCursor tcur) {
+
+ if (!cursorList.containsKey(tcur.getSessionID())) {
+ cursorList.put(tcur.getSessionID(), tcur);
+ repaint();
+ }
+
+ if (verbose)
+ System.out.println("add cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+") "+tcur.getX()+" "+tcur.getY());
+ }
- public void updateTuioCursor(TuioCursor tcur) {
+ public void updateTuioCursor(TuioCursor tcur) {
- repaint();
-
- if (verbose)
- System.out.println("set cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+") "+tcur.getX()+" "+tcur.getY()+" "+tcur.getMotionSpeed()+" "+tcur.getMotionAccel());
- }
-
- public void removeTuioCursor(TuioCursor tcur) {
-
- cursorList.remove(tcur.getSessionID());
- repaint();
-
- if (verbose)
- System.out.println("del cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+")");
- }
-
- public void addTuioString(TuioString tstr) {
-
- if (!stringList.containsKey(tstr.getSessionID())) {
- stringList.put(tstr.getSessionID(), tstr);
- repaint();
- }
-
- if (verbose)
- System.out.println("add str "+tstr.getStringID()+" ("+tstr.getSessionID()+") "+tstr.getMessage());
- }
+ repaint();
+
+ if (verbose)
+ System.out.println("set cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+") "+tcur.getX()+" "+tcur.getY()+" "+tcur.getMotionSpeed()+" "+tcur.getMotionAccel());
+ }
+
+ public void removeTuioCursor(TuioCursor tcur) {
+
+ cursorList.remove(tcur.getSessionID());
+ repaint();
+
+ if (verbose)
+ System.out.println("del cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+")");
+ }
+
+ public void addTuioString(TuioString tstr) {
+
+ if (!stringList.containsKey(tstr.getSessionID())) {
+ stringList.put(tstr.getSessionID(), tstr);
+ repaint();
+ }
+
+ if (verbose)
+ System.out.println("add str "+tstr.getStringID()+" ("+tstr.getSessionID()+") "+tstr.getMessage());
+ }
- public void updateTuioString(TuioString tstr) {
+ public void updateTuioString(TuioString tstr) {
- repaint();
-
- if (verbose)
- System.out.println("set str "+tstr.getStringID()+" ("+tstr.getSessionID()+") "+tstr.getMessage());
- }
-
- public void removeTuioString(TuioString tstr) {
-
- stringList.remove(tstr.getSessionID());
- repaint();
-
- if (verbose)
- System.out.println("del str "+tstr.getStringID()+" ("+tstr.getSessionID()+")");
- }
+ repaint();
+
+ if (verbose)
+ System.out.println("set str "+tstr.getStringID()+" ("+tstr.getSessionID()+") "+tstr.getMessage());
+ }
+
+ public void removeTuioString(TuioString tstr) {
+
+ stringList.remove(tstr.getSessionID());
+ repaint();
+
+ if (verbose)
+ System.out.println("del str "+tstr.getStringID()+" ("+tstr.getSessionID()+")");
+ }
- public void refresh(TuioTime frameTime) {
- repaint();
- }
-
- public void paint(Graphics g) {
- update(g);
- }
+ public void refresh(TuioTime frameTime) {
+ repaint();
+ }
+
+ public void paint(Graphics g) {
+ update(g);
+ }
- public void update(Graphics g) {
-
- Graphics2D g2 = (Graphics2D)g;
- g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
-
- g2.setColor(Color.white);
- g2.fillRect(0,0,width,height);
-
- int w = (int)Math.round(width-scale*finger_size/2.0f);
- int h = (int)Math.round(height-scale*finger_size/2.0f);
-
- Enumeration<TuioCursor> cursors = cursorList.elements();
- while (cursors.hasMoreElements()) {
- TuioCursor tcur = cursors.nextElement();
- if (tcur==null) continue;
- Vector<TuioPoint> path = tcur.getPath();
- TuioPoint current_point = path.elementAt(0);
- if (current_point!=null) {
- // draw the cursor path
- g2.setPaint(Color.blue);
- for (int i=0;i<path.size();i++) {
- TuioPoint next_point = path.elementAt(i);
- g2.drawLine(current_point.getScreenX(w), current_point.getScreenY(h), next_point.getScreenX(w), next_point.getScreenY(h));
- current_point = next_point;
- }
- }
-
- // draw the finger tip
- g2.setPaint(Color.lightGray);
- int s = (int)(scale*finger_size);
- g2.fillOval(current_point.getScreenX(w-s/2),current_point.getScreenY(h-s/2),s,s);
- g2.setPaint(Color.black);
- g2.drawString(tcur.getCursorID()+"",current_point.getScreenX(w),current_point.getScreenY(h));
- }
+ public void update(Graphics g) {
+
+ Graphics2D g2 = (Graphics2D)g;
+ g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ g2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
+
+ g2.setColor(Color.white);
+ g2.fillRect(0,0,width,height);
+
+ int w = (int)Math.round(width-scale*finger_size/2.0f);
+ int h = (int)Math.round(height-scale*finger_size/2.0f);
+
+ Enumeration<TuioCursor> cursors = cursorList.elements();
+ while (cursors.hasMoreElements()) {
+ TuioCursor tcur = cursors.nextElement();
+ if (tcur==null) continue;
+ Vector<TuioPoint> path = tcur.getPath();
+ TuioPoint current_point = path.elementAt(0);
+ if (current_point!=null) {
+ // draw the cursor path
+ g2.setPaint(Color.blue);
+ for (int i=0;i<path.size();i++) {
+ TuioPoint next_point = path.elementAt(i);
+ g2.drawLine(current_point.getScreenX(w), current_point.getScreenY(h), next_point.getScreenX(w), next_point.getScreenY(h));
+ current_point = next_point;
+ }
+ }
+
+ // draw the finger tip
+ g2.setPaint(Color.lightGray);
+ int s = (int)(scale*finger_size);
+ g2.fillOval(current_point.getScreenX(w-s/2),current_point.getScreenY(h-s/2),s,s);
+ g2.setPaint(Color.black);
+ g2.drawString(tcur.getCursorID()+"",current_point.getScreenX(w),current_point.getScreenY(h));
+ }
- // draw the objects
- Enumeration<TuioDemoObject> objects = objectList.elements();
- while (objects.hasMoreElements()) {
- TuioDemoObject tobj = objects.nextElement();
- if (tobj!=null) tobj.paint(g2, width,height);
- }
- }
+ // draw the objects
+ Enumeration<TuioDemoObject> objects = objectList.elements();
+ while (objects.hasMoreElements()) {
+ TuioDemoObject tobj = objects.nextElement();
+ if (tobj!=null) tobj.paint(g2, width,height);
+ }
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/TuioDemoObject.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TuioDemoObject.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,22 +1,22 @@
-/*
- TUIO Java Demo - part of the reacTIVision project
- http://reactivision.sourceforge.net/
+/*
+ TUIO Java Demo - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import javax.swing.*;
@@ -28,54 +28,54 @@
public class TuioDemoObject extends TuioObject {
- private Shape square;
+ private Shape square;
- public TuioDemoObject(TuioObject tobj) {
- super(tobj);
- int size = TuioDemoComponent.object_size;
- square = new Rectangle2D.Float(-size/2,-size/2,size,size);
-
- AffineTransform transform = new AffineTransform();
- transform.translate(xpos,ypos);
- transform.rotate(angle,xpos,ypos);
- square = transform.createTransformedShape(square);
- }
-
- public void paint(Graphics2D g, int width, int height) {
-
- float Xpos = xpos*width;
- float Ypos = ypos*height;
- float scale = height/(float)TuioDemoComponent.table_size;
+ public TuioDemoObject(TuioObject tobj) {
+ super(tobj);
+ int size = TuioDemoComponent.object_size;
+ square = new Rectangle2D.Float(-size/2,-size/2,size,size);
+
+ AffineTransform transform = new AffineTransform();
+ transform.translate(xpos,ypos);
+ transform.rotate(angle,xpos,ypos);
+ square = transform.createTransformedShape(square);
+ }
+
+ public void paint(Graphics2D g, int width, int height) {
+
+ float Xpos = xpos*width;
+ float Ypos = ypos*height;
+ float scale = height/(float)TuioDemoComponent.table_size;
- AffineTransform trans = new AffineTransform();
- trans.translate(-xpos,-ypos);
- trans.translate(Xpos,Ypos);
- trans.scale(scale,scale);
- Shape s = trans.createTransformedShape(square);
-
- g.setPaint(Color.black);
- g.fill(s);
- g.setPaint(Color.white);
- g.drawString(symbol_id+"",Xpos-10,Ypos);
- }
+ AffineTransform trans = new AffineTransform();
+ trans.translate(-xpos,-ypos);
+ trans.translate(Xpos,Ypos);
+ trans.scale(scale,scale);
+ Shape s = trans.createTransformedShape(square);
+
+ g.setPaint(Color.black);
+ g.fill(s);
+ g.setPaint(Color.white);
+ g.drawString(symbol_id+"",Xpos-10,Ypos);
+ }
- public void update(TuioObject tobj) {
-
- float dx = tobj.getX() - xpos;
- float dy = tobj.getY() - ypos;
- float da = tobj.getAngle() - angle;
+ public void update(TuioObject tobj) {
+
+ float dx = tobj.getX() - xpos;
+ float dy = tobj.getY() - ypos;
+ float da = tobj.getAngle() - angle;
- if ((dx!=0) || (dy!=0)) {
- AffineTransform trans = AffineTransform.getTranslateInstance(dx,dy);
- square = trans.createTransformedShape(square);
- }
-
- if (da!=0) {
- AffineTransform trans = AffineTransform.getRotateInstance(da,tobj.getX(),tobj.getY());
- square = trans.createTransformedShape(square);
- }
+ if ((dx!=0) || (dy!=0)) {
+ AffineTransform trans = AffineTransform.getTranslateInstance(dx,dy);
+ square = trans.createTransformedShape(square);
+ }
+
+ if (da!=0) {
+ AffineTransform trans = AffineTransform.getRotateInstance(da,tobj.getX(),tobj.getY());
+ square = trans.createTransformedShape(square);
+ }
- super.update(tobj);
- }
+ super.update(tobj);
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/TuioDump.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/TuioDump.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,22 +1,22 @@
-/*
- TUIO Java Example - part of the reacTIVision project
- http://reactivision.sourceforge.net/
+/*
+ TUIO Java Example - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
- This program is free software;you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation;either version 2 of the License, or
- (at your option) any later version.
+ This program is free software;you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation;either version 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY;without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY;without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program;if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU General Public License
+ along with this program;if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import javax.swing.*;
@@ -26,61 +26,61 @@
import TUIO.*;
public class TuioDump implements TuioListener {
-
- public void addTuioObject(TuioObject tobj) {
- System.out.println("add obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle());
- }
+
+ public void addTuioObject(TuioObject tobj) {
+ System.out.println("add obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle());
+ }
- public void updateTuioObject(TuioObject tobj) {
- System.out.println("set obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle()+" "+tobj.getMotionSpeed()+" "+tobj.getRotationSpeed()+" "+tobj.getMotionAccel()+" "+tobj.getRotationAccel());
- }
-
- public void removeTuioObject(TuioObject tobj) {
- System.out.println("del obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+")");
- }
+ public void updateTuioObject(TuioObject tobj) {
+ System.out.println("set obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle()+" "+tobj.getMotionSpeed()+" "+tobj.getRotationSpeed()+" "+tobj.getMotionAccel()+" "+tobj.getRotationAccel());
+ }
+
+ public void removeTuioObject(TuioObject tobj) {
+ System.out.println("del obj "+tobj.getSymbolID()+" ("+tobj.getSessionID()+")");
+ }
- public void addTuioCursor(TuioCursor tcur) {
- System.out.println("add cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+") "+tcur.getX()+" "+tcur.getY());
- }
+ public void addTuioCursor(TuioCursor tcur) {
+ System.out.println("add cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+") "+tcur.getX()+" "+tcur.getY());
+ }
- public void updateTuioCursor(TuioCursor tcur) {
- System.out.println("set cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+") "+tcur.getX()+" "+tcur.getY()+" "+tcur.getMotionSpeed()+" "+tcur.getMotionAccel());
- }
-
- public void removeTuioCursor(TuioCursor tcur) {
- System.out.println("del cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+")");
- }
-
- public void addTuioString(TuioString tstr) {
- System.out.println("add str "+tstr.getStringID()+" ("+tstr.getSessionID()+") "+tstr.getMessage());
- }
+ public void updateTuioCursor(TuioCursor tcur) {
+ System.out.println("set cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+") "+tcur.getX()+" "+tcur.getY()+" "+tcur.getMotionSpeed()+" "+tcur.getMotionAccel());
+ }
+
+ public void removeTuioCursor(TuioCursor tcur) {
+ System.out.println("del cur "+tcur.getCursorID()+" ("+tcur.getSessionID()+")");
+ }
+
+ public void addTuioString(TuioString tstr) {
+ System.out.println("add str "+tstr.getStringID()+" ("+tstr.getSessionID()+") "+tstr.getMessage());
+ }
- public void updateTuioString(TuioString tstr) {
- System.out.println("set str "+tstr.getStringID()+" ("+tstr.getSessionID()+") "+tstr.getMessage());
- }
-
- public void removeTuioString(TuioString tstr) {
- System.out.println("del str "+tstr.getStringID()+" ("+tstr.getSessionID()+")");
- }
-
- public void refresh(TuioTime frameTime) {
- //System.out.println("refresh "+frameTime.getTotalMilliseconds());
- }
+ public void updateTuioString(TuioString tstr) {
+ System.out.println("set str "+tstr.getStringID()+" ("+tstr.getSessionID()+") "+tstr.getMessage());
+ }
+
+ public void removeTuioString(TuioString tstr) {
+ System.out.println("del str "+tstr.getStringID()+" ("+tstr.getSessionID()+")");
+ }
+
+ public void refresh(TuioTime frameTime) {
+ //System.out.println("refresh "+frameTime.getTotalMilliseconds());
+ }
- public static void main(String argv[]) {
-
- int port = 3333;
+ public static void main(String argv[]) {
+
+ int port = 3333;
- if (argv.length==1) {
- try { port = Integer.parseInt(argv[0]); }
- catch (Exception e) { System.out.println("usage: java TuioDump [port]"); }
- }
+ if (argv.length==1) {
+ try { port = Integer.parseInt(argv[0]); }
+ catch (Exception e) { System.out.println("usage: java TuioDump [port]"); }
+ }
- TuioDump demo = new TuioDump();
- TuioClient client = new TuioClient(port);
+ TuioDump demo = new TuioDump();
+ TuioClient client = new TuioClient(port);
- System.out.println("listening to TUIO messages at port "+port);
- client.addTuioListener(demo);
- client.connect();
- }
+ System.out.println("listening to TUIO messages at port "+port);
+ client.addTuioListener(demo);
+ client.connect();
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCBundle.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCBundle.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-
+
/**
* @author cramakrishnan
*
@@ -27,114 +27,114 @@
public class OSCBundle extends OSCPacket {
- protected Date timestamp;
- // protected OSCPacket[] packets;
- protected Vector<OSCPacket> packets;
- public static final BigInteger SECONDS_FROM_1900_to_1970 =
- new BigInteger("2208988800");
- // 17 leap years
+ protected Date timestamp;
+ // protected OSCPacket[] packets;
+ protected Vector<OSCPacket> packets;
+ public static final BigInteger SECONDS_FROM_1900_to_1970 =
+ new BigInteger("2208988800");
+ // 17 leap years
- /**
- * Create a new OSCBundle, with a timestamp of now.
- * You can add packets to the bundle with addPacket()
- */
- public OSCBundle() {
- this(null, GregorianCalendar.getInstance().getTime());
- }
-
- /**
- * Create an OSCBundle with the specified timestamp
- * @param timestamp
- */
- public OSCBundle(Date timestamp) {
- this(null, timestamp);
- }
+ /**
+ * Create a new OSCBundle, with a timestamp of now.
+ * You can add packets to the bundle with addPacket()
+ */
+ public OSCBundle() {
+ this(null, GregorianCalendar.getInstance().getTime());
+ }
+
+ /**
+ * Create an OSCBundle with the specified timestamp
+ * @param timestamp
+ */
+ public OSCBundle(Date timestamp) {
+ this(null, timestamp);
+ }
- /**
- * @param newPackets Array of OSCPackets to initialize this object with
- */
- public OSCBundle(OSCPacket[] newPackets) {
- this(newPackets, GregorianCalendar.getInstance().getTime());
- }
+ /**
+ * @param newPackets Array of OSCPackets to initialize this object with
+ */
+ public OSCBundle(OSCPacket[] newPackets) {
+ this(newPackets, GregorianCalendar.getInstance().getTime());
+ }
- /**
- * @param newPackets OscPacket[]
- * @param time java.lang.Time
- */
- public OSCBundle(OSCPacket[] newPackets, Date newTimestamp) {
- super();
- if (null != newPackets) {
- packets = new Vector<OSCPacket>(newPackets.length);
- for (int i = 0; i < newPackets.length; i++) {
- packets.add(newPackets[i]);
- }
- } else
- packets = new Vector<OSCPacket>();
- timestamp = newTimestamp;
- init();
- }
-
- /**
- * Return the timestamp for this bundle
- * @return a Date
- */
- public Date getTimestamp() {
- return timestamp;
- }
-
- /**
- * Set the timestamp for this bundle
- * @param timestamp
- */
- public void setTimestamp(Date timestamp) {
- this.timestamp = timestamp;
- }
-
- /**
- * Add a packet to the list of packets in this bundle
- * @param packet
- */
- public void addPacket(OSCPacket packet) {
- packets.add(packet);
- }
-
- /**
- * Get the packets contained in this bundle
- * @return an array of packets
- */
- public OSCPacket[] getPackets() {
- OSCPacket[] packetArray = new OSCPacket[packets.size()];
- packets.toArray(packetArray);
- return packetArray;
- }
+ /**
+ * @param newPackets OscPacket[]
+ * @param time java.lang.Time
+ */
+ public OSCBundle(OSCPacket[] newPackets, Date newTimestamp) {
+ super();
+ if (null != newPackets) {
+ packets = new Vector<OSCPacket>(newPackets.length);
+ for (int i = 0; i < newPackets.length; i++) {
+ packets.add(newPackets[i]);
+ }
+ } else
+ packets = new Vector<OSCPacket>();
+ timestamp = newTimestamp;
+ init();
+ }
+
+ /**
+ * Return the timestamp for this bundle
+ * @return a Date
+ */
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * Set the timestamp for this bundle
+ * @param timestamp
+ */
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ /**
+ * Add a packet to the list of packets in this bundle
+ * @param packet
+ */
+ public void addPacket(OSCPacket packet) {
+ packets.add(packet);
+ }
+
+ /**
+ * Get the packets contained in this bundle
+ * @return an array of packets
+ */
+ public OSCPacket[] getPackets() {
+ OSCPacket[] packetArray = new OSCPacket[packets.size()];
+ packets.toArray(packetArray);
+ return packetArray;
+ }
- protected void computeTimeTagByteArray(OSCJavaToByteArrayConverter stream) {
- long millisecs = timestamp.getTime();
- long secsSince1970 = (long) (millisecs / 1000);
- long secs = secsSince1970 + SECONDS_FROM_1900_to_1970.longValue();
- long picosecs = (long) (millisecs - (secsSince1970 * 1000)) * 1000;
-
- stream.write((int) secs);
- stream.write((int) picosecs);
+ protected void computeTimeTagByteArray(OSCJavaToByteArrayConverter stream) {
+ long millisecs = timestamp.getTime();
+ long secsSince1970 = (long) (millisecs / 1000);
+ long secs = secsSince1970 + SECONDS_FROM_1900_to_1970.longValue();
+ long picosecs = (long) (millisecs - (secsSince1970 * 1000)) * 1000;
+
+ stream.write((int) secs);
+ stream.write((int) picosecs);
- }
+ }
- /**
- * @param stream OscPacketByteArrayConverter
- */
- protected void computeByteArray(OSCJavaToByteArrayConverter stream) {
- stream.write("#bundle");
- computeTimeTagByteArray(stream);
- Enumeration enm = packets.elements();
- OSCPacket nextElement;
- byte[] packetBytes;
- while (enm.hasMoreElements()) {
- nextElement = (OSCPacket) enm.nextElement();
- packetBytes = nextElement.getByteArray();
- stream.write(packetBytes.length);
- stream.write(packetBytes);
- }
- byteArray = stream.toByteArray();
- }
+ /**
+ * @param stream OscPacketByteArrayConverter
+ */
+ protected void computeByteArray(OSCJavaToByteArrayConverter stream) {
+ stream.write("#bundle");
+ computeTimeTagByteArray(stream);
+ Enumeration enm = packets.elements();
+ OSCPacket nextElement;
+ byte[] packetBytes;
+ while (enm.hasMoreElements()) {
+ nextElement = (OSCPacket) enm.nextElement();
+ packetBytes = nextElement.getByteArray();
+ stream.write(packetBytes.length);
+ stream.write(packetBytes);
+ }
+ byteArray = stream.toByteArray();
+ }
}
\ No newline at end of file
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCCanNotListenException.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCCanNotListenException.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/* $Id: OSCCanNotListenException.java,v 1.1.1.1 2006/11/13 14:47:21 modin Exp $
+/* $Id: OSCCanNotListenException.java,v 1.1.1.1 2006/11/13 14:47:21 modin Exp $
* Created on 21.02.2004
*/
package com.illposed.osc;
@@ -13,37 +13,37 @@
*/
public class OSCCanNotListenException extends Exception {
- /**
- *
- */
- public OSCCanNotListenException() {
- super();
- // TODO Auto-generated constructor stub
- }
+ /**
+ *
+ */
+ public OSCCanNotListenException() {
+ super();
+ // TODO Auto-generated constructor stub
+ }
- /**
- * @param message
- */
- public OSCCanNotListenException(String message) {
- super(message);
- // TODO Auto-generated constructor stub
- }
+ /**
+ * @param message
+ */
+ public OSCCanNotListenException(String message) {
+ super(message);
+ // TODO Auto-generated constructor stub
+ }
- /**
- * @param message
- * @param cause
- */
-/* public OSCCanNotListenException(String message, Throwable cause) {
- super(message, cause);
- // TODO Auto-generated constructor stub
- }
+ /**
+ * @param message
+ * @param cause
+ */
+/* public OSCCanNotListenException(String message, Throwable cause) {
+ super(message, cause);
+ // TODO Auto-generated constructor stub
+ }
*/
- /**
- * @param cause
- */
-/* public OSCCanNotListenException(Throwable cause) {
- super(cause);
- // TODO Auto-generated constructor stub
- }
+ /**
+ * @param cause
+ */
+/* public OSCCanNotListenException(Throwable cause) {
+ super(cause);
+ // TODO Auto-generated constructor stub
+ }
*/
}
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCListener.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCListener.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/* $Id: OSCListener.java,v 1.1.1.1 2006/11/13 14:47:21 modin Exp $
+/* $Id: OSCListener.java,v 1.1.1.1 2006/11/13 14:47:21 modin Exp $
* Created on 28.10.2003
*/
package com.illposed.osc;
@@ -16,12 +16,12 @@
* Interface for things that listen for incoming OSC Messages
*/
public interface OSCListener {
-
- /**
- * Accept an incoming OSCMessage
- * @param time the time this message is to be executed. null means execute now
- * @param message the message
- */
- public void acceptMessage(Date time, OSCMessage message);
+
+ /**
+ * Accept an incoming OSCMessage
+ * @param time the time this message is to be executed. null means execute now
+ * @param message the message
+ */
+ public void acceptMessage(Date time, OSCMessage message);
}
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCMessage.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCMessage.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/**
+/**
* @author cramakrishnan
*
* Copyright (C) 2003, C. Ramakrishnan / Illposed Software
@@ -21,98 +21,98 @@
public class OSCMessage extends OSCPacket {
- protected String address;
- protected Vector<Object> arguments;
+ protected String address;
+ protected Vector<Object> arguments;
- /**
- * Create an empty OSC Message
- * In order to send this osc message, you need to set the address
- * and, perhaps, some arguments.
- */
- public OSCMessage() {
- super();
- arguments = new Vector<Object>();
- }
+ /**
+ * Create an empty OSC Message
+ * In order to send this osc message, you need to set the address
+ * and, perhaps, some arguments.
+ */
+ public OSCMessage() {
+ super();
+ arguments = new Vector<Object>();
+ }
- /**
- * Create an OSCMessage with an address already initialized
- * @param newAddress The recepient of this OSC message
- */
- public OSCMessage(String newAddress) {
- this(newAddress, null);
- }
+ /**
+ * Create an OSCMessage with an address already initialized
+ * @param newAddress The recepient of this OSC message
+ */
+ public OSCMessage(String newAddress) {
+ this(newAddress, null);
+ }
- /**
- * Create an OSCMessage with an address and arguments already initialized
- * @param newAddress The recepient of this OSC message
- * @param newArguments The data sent to the receiver
- */
- public OSCMessage(String newAddress, Object[] newArguments) {
- super();
- address = newAddress;
- if (null != newArguments) {
- arguments = new Vector<Object>(newArguments.length);
- for (int i = 0; i < newArguments.length; i++) {
- arguments.add(newArguments[i]);
- }
- } else
- arguments = new Vector<Object>();
- init();
- }
-
- /**
- * @return the address of this OSC Message
- */
- public String getAddress() {
- return address;
- }
-
- /**
- * Set the address of this messsage
- * @param anAddress
- */
- public void setAddress(String anAddress) {
- address = anAddress;
- }
-
- public void addArgument(Object argument) {
- arguments.add(argument);
- }
-
- public Object[] getArguments() {
- return arguments.toArray();
- }
+ /**
+ * Create an OSCMessage with an address and arguments already initialized
+ * @param newAddress The recepient of this OSC message
+ * @param newArguments The data sent to the receiver
+ */
+ public OSCMessage(String newAddress, Object[] newArguments) {
+ super();
+ address = newAddress;
+ if (null != newArguments) {
+ arguments = new Vector<Object>(newArguments.length);
+ for (int i = 0; i < newArguments.length; i++) {
+ arguments.add(newArguments[i]);
+ }
+ } else
+ arguments = new Vector<Object>();
+ init();
+ }
+
+ /**
+ * @return the address of this OSC Message
+ */
+ public String getAddress() {
+ return address;
+ }
+
+ /**
+ * Set the address of this messsage
+ * @param anAddress
+ */
+ public void setAddress(String anAddress) {
+ address = anAddress;
+ }
+
+ public void addArgument(Object argument) {
+ arguments.add(argument);
+ }
+
+ public Object[] getArguments() {
+ return arguments.toArray();
+ }
- /**
- * @param stream OscPacketByteArrayConverter
- */
- protected void computeAddressByteArray(OSCJavaToByteArrayConverter stream) {
- stream.write(address);
- }
+ /**
+ * @param stream OscPacketByteArrayConverter
+ */
+ protected void computeAddressByteArray(OSCJavaToByteArrayConverter stream) {
+ stream.write(address);
+ }
- /**
- * @param stream OscPacketByteArrayConverter
- */
- protected void computeArgumentsByteArray(OSCJavaToByteArrayConverter stream) {
- // SC starting at version 2.2.10 wants a comma at the beginning
- // of the arguments array.
- stream.write(',');
- if (null == arguments)
- return;
- stream.writeTypes(arguments);
- Enumeration enm = arguments.elements();
- while (enm.hasMoreElements()) {
- stream.write(enm.nextElement());
- }
- }
+ /**
+ * @param stream OscPacketByteArrayConverter
+ */
+ protected void computeArgumentsByteArray(OSCJavaToByteArrayConverter stream) {
+ // SC starting at version 2.2.10 wants a comma at the beginning
+ // of the arguments array.
+ stream.write(',');
+ if (null == arguments)
+ return;
+ stream.writeTypes(arguments);
+ Enumeration enm = arguments.elements();
+ while (enm.hasMoreElements()) {
+ stream.write(enm.nextElement());
+ }
+ }
- /**
- * @param stream OscPacketByteArrayConverter
- */
- protected void computeByteArray(OSCJavaToByteArrayConverter stream) {
- computeAddressByteArray(stream);
- computeArgumentsByteArray(stream);
- byteArray = stream.toByteArray();
- }
+ /**
+ * @param stream OscPacketByteArrayConverter
+ */
+ protected void computeByteArray(OSCJavaToByteArrayConverter stream) {
+ computeAddressByteArray(stream);
+ computeArgumentsByteArray(stream);
+ byteArray = stream.toByteArray();
+ }
}
\ No newline at end of file
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCPacket.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCPacket.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/**
+/**
* @author cramakrishnan
*
* Copyright (C) 2003, C. Ramakrishnan / Illposed Software
@@ -26,35 +26,35 @@
public abstract class OSCPacket {
- protected byte[] byteArray;
+ protected byte[] byteArray;
- public OSCPacket() {
- super();
- }
+ public OSCPacket() {
+ super();
+ }
- protected void computeByteArray() {
- OSCJavaToByteArrayConverter stream = new OSCJavaToByteArrayConverter();
- computeByteArray(stream);
- }
+ protected void computeByteArray() {
+ OSCJavaToByteArrayConverter stream = new OSCJavaToByteArrayConverter();
+ computeByteArray(stream);
+ }
- /**
- * @param stream OscPacketByteArrayConverter
- *
- * Subclasses should implement this method to product a byte array
- * formatted according to the OSC/SuperCollider specification.
- */
- protected abstract void computeByteArray(OSCJavaToByteArrayConverter stream);
+ /**
+ * @param stream OscPacketByteArrayConverter
+ *
+ * Subclasses should implement this method to product a byte array
+ * formatted according to the OSC/SuperCollider specification.
+ */
+ protected abstract void computeByteArray(OSCJavaToByteArrayConverter stream);
- /**
- * @return byte[]
- */
- public byte[] getByteArray() {
- computeByteArray();
- return byteArray;
- }
+ /**
+ * @return byte[]
+ */
+ public byte[] getByteArray() {
+ computeByteArray();
+ return byteArray;
+ }
- protected void init() {
-
- }
+ protected void init() {
+
+ }
}
\ No newline at end of file
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCPort.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCPort.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/**
+/**
* @author cramakrishnan
*
* Copyright (C) 2004, C. Ramakrishnan / Illposed Software
@@ -19,33 +19,33 @@
public abstract class OSCPort {
- protected DatagramSocket socket;
- protected int port;
-
- /**
- * The port that the SuperCollider synth engine ususally listens too
- */
- public static final int defaultSCOSCPort = 57110;
-
- /**
- * The port that the SuperCollider language engine ususally listens too
- */
- public static final int defaultSCLangOSCPort = 57120;
-
- /**
- * @see java.lang.Object#finalize()
- */
- protected void finalize() throws Throwable {
- super.finalize();
- socket.close();
- }
-
- /**
- * Close the socket and free-up resources. It's recommended that clients call
- * this when they are done with the port.
- */
- public void close() {
- socket.close();
- }
+ protected DatagramSocket socket;
+ protected int port;
+
+ /**
+ * The port that the SuperCollider synth engine ususally listens too
+ */
+ public static final int defaultSCOSCPort = 57110;
+
+ /**
+ * The port that the SuperCollider language engine ususally listens too
+ */
+ public static final int defaultSCLangOSCPort = 57120;
+
+ /**
+ * @see java.lang.Object#finalize()
+ */
+ protected void finalize() throws Throwable {
+ super.finalize();
+ socket.close();
+ }
+
+ /**
+ * Close the socket and free-up resources. It's recommended that clients call
+ * this when they are done with the port.
+ */
+ public void close() {
+ socket.close();
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCPortIn.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCPortIn.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/**
+/**
* @author cramakrishnan
*
* Copyright (C) 2004, C. Ramakrishnan / Illposed Software
@@ -8,20 +8,20 @@
*
*
* OSCPortIn is the class that listens for OSC messages.
- *
+ *
* To receive OSC, you need to construct the OSCPort with a
*
* An example based on com.illposed.osc.test.OSCPortTest::testReceiving() :
- receiver = new OSCPort(OSCPort.defaultSCOSCPort());
- OSCListener listener = new OSCListener() {
- public void acceptMessage(java.util.Date time, OSCMessage message) {
- System.out.println("Message received!");
- }
- };
- receiver.addListener("/message/receiving", listener);
- receiver.startListening();
-
+ receiver = new OSCPort(OSCPort.defaultSCOSCPort());
+ OSCListener listener = new OSCListener() {
+ public void acceptMessage(java.util.Date time, OSCMessage message) {
+ System.out.println("Message received!");
+ }
+ };
+ receiver.addListener("/message/receiving", listener);
+ receiver.startListening();
+
* Then, using a program such as SuperCollider or sendOSC, send a message
* to this computer, port 57110 (defaultSCOSCPort), with the address /message/receiving
*/
@@ -35,80 +35,80 @@
public class OSCPortIn extends OSCPort implements Runnable {
- // state for listening
- protected boolean isListening;
- protected OSCByteArrayToJavaConverter converter = new OSCByteArrayToJavaConverter();
- protected OSCPacketDispatcher dispatcher = new OSCPacketDispatcher();
-
- /**
- * Create an OSCPort that listens on port
- * @param port
- * @throws SocketException
- */
- public OSCPortIn(int port) throws SocketException {
- socket = new DatagramSocket(port);
- this.port = port;
- }
+ // state for listening
+ protected boolean isListening;
+ protected OSCByteArrayToJavaConverter converter = new OSCByteArrayToJavaConverter();
+ protected OSCPacketDispatcher dispatcher = new OSCPacketDispatcher();
+
+ /**
+ * Create an OSCPort that listens on port
+ * @param port
+ * @throws SocketException
+ */
+ public OSCPortIn(int port) throws SocketException {
+ socket = new DatagramSocket(port);
+ this.port = port;
+ }
- /**
- * @see java.lang.Runnable#run()
- */
- public void run() {
- //maximum UDP packet size
- byte[] buffer = new byte[65536];
- DatagramPacket packet = new DatagramPacket(buffer, 65536);
- while (isListening) {
- try {
- packet.setLength(65536);
- socket.receive(packet);
- OSCPacket oscPacket = converter.convert(buffer, packet.getLength());
- dispatcher.dispatchPacket(oscPacket);
- } catch (java.net.SocketException e) {
- if (isListening) e.printStackTrace();
- } catch (IOException e) {
- if (isListening) e.printStackTrace();
- }
- }
- }
-
- /**
- * Start listening for incoming OSCPackets
- */
- public void startListening() {
- isListening = true;
- Thread thread = new Thread(this);
- thread.start();
- }
-
- /**
- * Stop listening for incoming OSCPackets
- */
- public void stopListening() {
- isListening = false;
- }
-
- /**
- * Am I listening for packets?
- */
- public boolean isListening() {
- return isListening;
- }
-
- /**
- * Register the listener for incoming OSCPackets addressed to an Address
- * @param anAddress the address to listen for
- * @param listener the object to invoke when a message comes in
- */
- public void addListener(String anAddress, OSCListener listener) {
- dispatcher.addListener(anAddress, listener);
- }
-
- /**
- * Close the socket and free-up resources. It's recommended that clients call
- * this when they are done with the port.
- */
- public void close() {
- socket.close();
- }
+ /**
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+ //maximum UDP packet size
+ byte[] buffer = new byte[65536];
+ DatagramPacket packet = new DatagramPacket(buffer, 65536);
+ while (isListening) {
+ try {
+ packet.setLength(65536);
+ socket.receive(packet);
+ OSCPacket oscPacket = converter.convert(buffer, packet.getLength());
+ dispatcher.dispatchPacket(oscPacket);
+ } catch (java.net.SocketException e) {
+ if (isListening) e.printStackTrace();
+ } catch (IOException e) {
+ if (isListening) e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Start listening for incoming OSCPackets
+ */
+ public void startListening() {
+ isListening = true;
+ Thread thread = new Thread(this);
+ thread.start();
+ }
+
+ /**
+ * Stop listening for incoming OSCPackets
+ */
+ public void stopListening() {
+ isListening = false;
+ }
+
+ /**
+ * Am I listening for packets?
+ */
+ public boolean isListening() {
+ return isListening;
+ }
+
+ /**
+ * Register the listener for incoming OSCPackets addressed to an Address
+ * @param anAddress the address to listen for
+ * @param listener the object to invoke when a message comes in
+ */
+ public void addListener(String anAddress, OSCListener listener) {
+ dispatcher.addListener(anAddress, listener);
+ }
+
+ /**
+ * Close the socket and free-up resources. It's recommended that clients call
+ * this when they are done with the port.
+ */
+ public void close() {
+ socket.close();
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCPortOut.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/OSCPortOut.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/**
+/**
* @author cramakrishnan
*
* Copyright (C) 2004, C. Ramakrishnan / Illposed Software
@@ -15,16 +15,16 @@
* When you want to send an OSC message, call send().
*
* An example based on com.illposed.osc.test.OSCPortTest::testMessageWithArgs() :
- OSCPort sender = new OSCPort();
- Object args[] = new Object[2];
- args[0] = new Integer(3);
- args[1] = "hello";
- OSCMessage msg = new OSCMessage("/sayhello", args);
- try {
- sender.send(msg);
- } catch (Exception e) {
- showError("Couldn't send");
- }
+ OSCPort sender = new OSCPort();
+ Object args[] = new Object[2];
+ args[0] = new Integer(3);
+ args[1] = "hello";
+ OSCMessage msg = new OSCMessage("/sayhello", args);
+ try {
+ sender.send(msg);
+ } catch (Exception e) {
+ showError("Couldn't send");
+ }
*/
package com.illposed.osc;
@@ -35,45 +35,45 @@
public class OSCPortOut extends OSCPort {
- protected InetAddress address;
+ protected InetAddress address;
- /**
- * Create an OSCPort that sends to newAddress, newPort
- * @param newAddress InetAddress
- * @param newPort int
- */
- public OSCPortOut(InetAddress newAddress, int newPort) throws SocketException {
- socket = new DatagramSocket();
- address = newAddress;
- port = newPort;
- }
+ /**
+ * Create an OSCPort that sends to newAddress, newPort
+ * @param newAddress InetAddress
+ * @param newPort int
+ */
+ public OSCPortOut(InetAddress newAddress, int newPort) throws SocketException {
+ socket = new DatagramSocket();
+ address = newAddress;
+ port = newPort;
+ }
- /**
- * Create an OSCPort that sends to newAddress, on the standard SuperCollider port
- * @param newAddress InetAddress
- *
- * Default the port to the standard one for SuperCollider
- */
- public OSCPortOut(InetAddress newAddress) throws SocketException {
- this(newAddress, defaultSCOSCPort);
- }
+ /**
+ * Create an OSCPort that sends to newAddress, on the standard SuperCollider port
+ * @param newAddress InetAddress
+ *
+ * Default the port to the standard one for SuperCollider
+ */
+ public OSCPortOut(InetAddress newAddress) throws SocketException {
+ this(newAddress, defaultSCOSCPort);
+ }
- /**
- * Create an OSCPort that sends to localhost, on the standard SuperCollider port
- * Default the address to localhost
- * Default the port to the standard one for SuperCollider
- */
- public OSCPortOut() throws UnknownHostException, SocketException {
- this(InetAddress.getLocalHost(), defaultSCOSCPort);
- }
-
- /**
- * @param aPacket OSCPacket
- */
- public void send(OSCPacket aPacket) throws IOException {
- byte[] byteArray = aPacket.getByteArray();
- DatagramPacket packet =
- new DatagramPacket(byteArray, byteArray.length,address,port);
- socket.send(packet);
- }
+ /**
+ * Create an OSCPort that sends to localhost, on the standard SuperCollider port
+ * Default the address to localhost
+ * Default the port to the standard one for SuperCollider
+ */
+ public OSCPortOut() throws UnknownHostException, SocketException {
+ this(InetAddress.getLocalHost(), defaultSCOSCPort);
+ }
+
+ /**
+ * @param aPacket OSCPacket
+ */
+ public void send(OSCPacket aPacket) throws IOException {
+ byte[] byteArray = aPacket.getByteArray();
+ DatagramPacket packet =
+ new DatagramPacket(byteArray, byteArray.length,address,port);
+ socket.send(packet);
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/utility/OSCByteArrayToJavaConverter.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/utility/OSCByteArrayToJavaConverter.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/* $Id: OSCByteArrayToJavaConverter.java,v 1.1.1.1 2006/11/13 14:47:22 modin Exp $
+/* $Id: OSCByteArrayToJavaConverter.java,v 1.1.1.1 2006/11/13 14:47:22 modin Exp $
* Created on 28.10.2003
*/
package com.illposed.osc.utility;
@@ -18,263 +18,263 @@
*/
public class OSCByteArrayToJavaConverter {
- byte[] bytes;
- int bytesLength;
- int streamPosition;
+ byte[] bytes;
+ int bytesLength;
+ int streamPosition;
- private byte[] intBytes = new byte[4];
- private byte[] floatBytes = new byte[4];
+ private byte[] intBytes = new byte[4];
+ private byte[] floatBytes = new byte[4];
- private byte[] secondBytes = new byte[8];
- private byte[] picosecBytes = new byte[8];
+ private byte[] secondBytes = new byte[8];
+ private byte[] picosecBytes = new byte[8];
- /**
- * Helper object for converting from a byte array to Java objects
- */
- /*public OSCByteArrayToJavaConverter() {
- super();
- }*/
+ /**
+ * Helper object for converting from a byte array to Java objects
+ */
+ /*public OSCByteArrayToJavaConverter() {
+ super();
+ }*/
- public OSCPacket convert(byte[] byteArray, int bytesLength) {
- bytes = byteArray;
- this.bytesLength = bytesLength;
- streamPosition = 0;
- if (isBundle())
- return convertBundle();
- else
- return convertMessage();
- }
+ public OSCPacket convert(byte[] byteArray, int bytesLength) {
+ bytes = byteArray;
+ this.bytesLength = bytesLength;
+ streamPosition = 0;
+ if (isBundle())
+ return convertBundle();
+ else
+ return convertMessage();
+ }
- private boolean isBundle() {
- // only need the first 7 to check if it is a bundle
- String bytesAsString = new String(bytes, 0, 7);
- return bytesAsString.startsWith("#bundle");
- }
+ private boolean isBundle() {
+ // only need the first 7 to check if it is a bundle
+ String bytesAsString = new String(bytes, 0, 7);
+ return bytesAsString.startsWith("#bundle");
+ }
- private OSCBundle convertBundle() {
- // skip the "#bundle " stuff
- streamPosition = 8;
- Date timestamp = readTimeTag();
- OSCBundle bundle = new OSCBundle(timestamp);
- OSCByteArrayToJavaConverter myConverter = new OSCByteArrayToJavaConverter();
- while (streamPosition < bytesLength) {
- // recursively read through the stream and convert packets you find
- int packetLength = ((Integer) readInteger()).intValue();
- byte[] packetBytes = new byte[packetLength];
- //streamPosition++;
- System.arraycopy(bytes,streamPosition,packetBytes,0,packetLength);
- streamPosition+=packetLength;
- //for (int i = 0; i < packetLength; i++)
- // packetBytes[i] = bytes[streamPosition++];
- OSCPacket packet = myConverter.convert(packetBytes, packetLength);
- bundle.addPacket(packet);
- }
- return bundle;
- }
+ private OSCBundle convertBundle() {
+ // skip the "#bundle " stuff
+ streamPosition = 8;
+ Date timestamp = readTimeTag();
+ OSCBundle bundle = new OSCBundle(timestamp);
+ OSCByteArrayToJavaConverter myConverter = new OSCByteArrayToJavaConverter();
+ while (streamPosition < bytesLength) {
+ // recursively read through the stream and convert packets you find
+ int packetLength = ((Integer) readInteger()).intValue();
+ byte[] packetBytes = new byte[packetLength];
+ //streamPosition++;
+ System.arraycopy(bytes,streamPosition,packetBytes,0,packetLength);
+ streamPosition+=packetLength;
+ //for (int i = 0; i < packetLength; i++)
+ // packetBytes[i] = bytes[streamPosition++];
+ OSCPacket packet = myConverter.convert(packetBytes, packetLength);
+ bundle.addPacket(packet);
+ }
+ return bundle;
+ }
- private OSCMessage convertMessage() {
- OSCMessage message = new OSCMessage();
- message.setAddress(readString());
- char[] types = readTypes();
- if (null == types) {
- // we are done
- return message;
- }
- moveToFourByteBoundry();
- for (int i = 0; i < types.length; i++) {
- if ('[' == types[i]) {
- // we're looking at an array -- read it in
- message.addArgument(readArray(types, i));
- // then increment i to the end of the array
- while (']' != types[i])
- i++;
- } else
- message.addArgument(readArgument(types[i]));
- }
- return message;
- }
+ private OSCMessage convertMessage() {
+ OSCMessage message = new OSCMessage();
+ message.setAddress(readString());
+ char[] types = readTypes();
+ if (null == types) {
+ // we are done
+ return message;
+ }
+ moveToFourByteBoundry();
+ for (int i = 0; i < types.length; i++) {
+ if ('[' == types[i]) {
+ // we're looking at an array -- read it in
+ message.addArgument(readArray(types, i));
+ // then increment i to the end of the array
+ while (']' != types[i])
+ i++;
+ } else
+ message.addArgument(readArgument(types[i]));
+ }
+ return message;
+ }
- private String readString() {
- int strLen = lengthOfCurrentString();
- char[] stringChars = new char[strLen];
- //System.arraycopy(bytes,streamPosition,stringChars,0,strLen);
- //streamPosition+=strLen;
- for (int i = 0; i < strLen; i++)
- stringChars[i] = (char) bytes[streamPosition++];
- moveToFourByteBoundry();
- return new String(stringChars);
- }
+ private String readString() {
+ int strLen = lengthOfCurrentString();
+ char[] stringChars = new char[strLen];
+ //System.arraycopy(bytes,streamPosition,stringChars,0,strLen);
+ //streamPosition+=strLen;
+ for (int i = 0; i < strLen; i++)
+ stringChars[i] = (char) bytes[streamPosition++];
+ moveToFourByteBoundry();
+ return new String(stringChars);
+ }
- /**
- * @return a char array with the types of the arguments
- */
- private char[] readTypes() {
- // the next byte should be a ","
- if (bytes[streamPosition] != 0x2C)
- return null;
- streamPosition++;
- // find out how long the list of types is
- int typesLen = lengthOfCurrentString();
- if (0 == typesLen) {
- return null;
- }
- // read in the types
- char[] typesChars = new char[typesLen];
- for (int i = 0; i < typesLen; i++) {
- typesChars[i] = (char) bytes[streamPosition++];
- }
- return typesChars;
- }
+ /**
+ * @return a char array with the types of the arguments
+ */
+ private char[] readTypes() {
+ // the next byte should be a ","
+ if (bytes[streamPosition] != 0x2C)
+ return null;
+ streamPosition++;
+ // find out how long the list of types is
+ int typesLen = lengthOfCurrentString();
+ if (0 == typesLen) {
+ return null;
+ }
+ // read in the types
+ char[] typesChars = new char[typesLen];
+ for (int i = 0; i < typesLen; i++) {
+ typesChars[i] = (char) bytes[streamPosition++];
+ }
+ return typesChars;
+ }
- /**
- * @param c type of argument
- * @return a Java representation of the argument
- */
- private Object readArgument(char c) {
- switch (c) {
- case 'i' :
- return readInteger();
- case 'h' :
- return readBigInteger();
- case 'f' :
- return readFloat();
- case 'd' :
- return readDouble();
- case 's' :
- return readString();
- case 'c' :
- return readChar();
- case 'T' :
- return Boolean.TRUE;
- case 'F' :
- return Boolean.FALSE;
- }
+ /**
+ * @param c type of argument
+ * @return a Java representation of the argument
+ */
+ private Object readArgument(char c) {
+ switch (c) {
+ case 'i' :
+ return readInteger();
+ case 'h' :
+ return readBigInteger();
+ case 'f' :
+ return readFloat();
+ case 'd' :
+ return readDouble();
+ case 's' :
+ return readString();
+ case 'c' :
+ return readChar();
+ case 'T' :
+ return Boolean.TRUE;
+ case 'F' :
+ return Boolean.FALSE;
+ }
- return null;
- }
+ return null;
+ }
- /**
- * @return a Character
- */
- private Object readChar() {
- return new Character((char) bytes[streamPosition++]);
- }
+ /**
+ * @return a Character
+ */
+ private Object readChar() {
+ return new Character((char) bytes[streamPosition++]);
+ }
- /**
- * @return a Double
- */
- private Object readDouble() {
- return readFloat();
- }
+ /**
+ * @return a Double
+ */
+ private Object readDouble() {
+ return readFloat();
+ }
- /**
- * @return a Float
- */
- private Object readFloat() {
- //byte[] floatBytes = new byte[4];
- floatBytes[0] = bytes[streamPosition++];
- floatBytes[1] = bytes[streamPosition++];
- floatBytes[2] = bytes[streamPosition++];
- floatBytes[3] = bytes[streamPosition++];
+ /**
+ * @return a Float
+ */
+ private Object readFloat() {
+ //byte[] floatBytes = new byte[4];
+ floatBytes[0] = bytes[streamPosition++];
+ floatBytes[1] = bytes[streamPosition++];
+ floatBytes[2] = bytes[streamPosition++];
+ floatBytes[3] = bytes[streamPosition++];
- int floatBits =
- ((floatBytes[3] & 0xFF) ) +
- ((floatBytes[2] & 0xFF) << 8) +
- ((floatBytes[1] & 0xFF) << 16) +
- ((floatBytes[0] & 0xFF) << 24);
-
- return new Float(Float.intBitsToFloat(floatBits));
- }
+ int floatBits =
+ ((floatBytes[3] & 0xFF) ) +
+ ((floatBytes[2] & 0xFF) << 8) +
+ ((floatBytes[1] & 0xFF) << 16) +
+ ((floatBytes[0] & 0xFF) << 24);
+
+ return new Float(Float.intBitsToFloat(floatBits));
+ }
- /**
- * @return a BigInteger
- */
- private Object readBigInteger() {
- //byte[] intBytes = new byte[4];
- intBytes[0] = bytes[streamPosition++];
- intBytes[1] = bytes[streamPosition++];
- intBytes[2] = bytes[streamPosition++];
- intBytes[3] = bytes[streamPosition++];
+ /**
+ * @return a BigInteger
+ */
+ private Object readBigInteger() {
+ //byte[] intBytes = new byte[4];
+ intBytes[0] = bytes[streamPosition++];
+ intBytes[1] = bytes[streamPosition++];
+ intBytes[2] = bytes[streamPosition++];
+ intBytes[3] = bytes[streamPosition++];
- int intBits =
- ((intBytes[3] & 0xFF) ) +
- ((intBytes[2] & 0xFF) << 8) +
- ((intBytes[1] & 0xFF) << 16) +
- ((intBytes[0] & 0xFF) << 24);
-
- return new Integer(intBits);
- }
+ int intBits =
+ ((intBytes[3] & 0xFF) ) +
+ ((intBytes[2] & 0xFF) << 8) +
+ ((intBytes[1] & 0xFF) << 16) +
+ ((intBytes[0] & 0xFF) << 24);
+
+ return new Integer(intBits);
+ }
- /**
- * @return an Integer
- */
- private Object readInteger() {
- //byte[] intBytes = new byte[4];
- intBytes[0] = bytes[streamPosition++];
- intBytes[1] = bytes[streamPosition++];
- intBytes[2] = bytes[streamPosition++];
- intBytes[3] = bytes[streamPosition++];
+ /**
+ * @return an Integer
+ */
+ private Object readInteger() {
+ //byte[] intBytes = new byte[4];
+ intBytes[0] = bytes[streamPosition++];
+ intBytes[1] = bytes[streamPosition++];
+ intBytes[2] = bytes[streamPosition++];
+ intBytes[3] = bytes[streamPosition++];
- int intBits =
- ((intBytes[3] & 0xFF) ) +
- ((intBytes[2] & 0xFF) << 8) +
- ((intBytes[1] & 0xFF) << 16) +
- ((intBytes[0] & 0xFF) << 24);
-
- return new Integer(intBits);
- }
-
- /**
- * @return a Date
- */
- private Date readTimeTag() {
- //byte[] secondBytes = new byte[8];
- //byte[] picosecBytes = new byte[8];
- /*for (int i = 4; i < 8; i++)
- secondBytes[i] = bytes[streamPosition++];
- for (int i = 4; i < 8; i++)
- picosecBytes[i] = bytes[streamPosition++];*/
- System.arraycopy(bytes,streamPosition,secondBytes,4,4);
- streamPosition+=4;
- System.arraycopy(bytes,streamPosition,picosecBytes,4,4);
- streamPosition+=4;
-
- BigInteger secsSince1900 = new BigInteger(secondBytes);
- long secsSince1970 = secsSince1900.longValue() - OSCBundle.SECONDS_FROM_1900_to_1970.longValue();
- if (secsSince1970 < 0) secsSince1970 = 0; // no point maintaining times in the distant past
- BigInteger picosecs = new BigInteger(picosecBytes);
- long millisecs = (secsSince1970 * 1000) + (picosecs.longValue() / 1000);
- return new Date(millisecs);
- }
+ int intBits =
+ ((intBytes[3] & 0xFF) ) +
+ ((intBytes[2] & 0xFF) << 8) +
+ ((intBytes[1] & 0xFF) << 16) +
+ ((intBytes[0] & 0xFF) << 24);
+
+ return new Integer(intBits);
+ }
+
+ /**
+ * @return a Date
+ */
+ private Date readTimeTag() {
+ //byte[] secondBytes = new byte[8];
+ //byte[] picosecBytes = new byte[8];
+ /*for (int i = 4; i < 8; i++)
+ secondBytes[i] = bytes[streamPosition++];
+ for (int i = 4; i < 8; i++)
+ picosecBytes[i] = bytes[streamPosition++];*/
+ System.arraycopy(bytes,streamPosition,secondBytes,4,4);
+ streamPosition+=4;
+ System.arraycopy(bytes,streamPosition,picosecBytes,4,4);
+ streamPosition+=4;
+
+ BigInteger secsSince1900 = new BigInteger(secondBytes);
+ long secsSince1970 = secsSince1900.longValue() - OSCBundle.SECONDS_FROM_1900_to_1970.longValue();
+ if (secsSince1970 < 0) secsSince1970 = 0; // no point maintaining times in the distant past
+ BigInteger picosecs = new BigInteger(picosecBytes);
+ long millisecs = (secsSince1970 * 1000) + (picosecs.longValue() / 1000);
+ return new Date(millisecs);
+ }
- /**
- * @param types
- * @param i
- * @return an Array
- */
- private Object[] readArray(char[] types, int i) {
- int arrayLen = 0;
- while (types[i + arrayLen] != ']')
- arrayLen++;
- Object[] array = new Object[arrayLen];
- for (int j = 0; i < arrayLen; j++) {
- array[j] = readArgument(types[i + j]);
- }
- return array;
- }
+ /**
+ * @param types
+ * @param i
+ * @return an Array
+ */
+ private Object[] readArray(char[] types, int i) {
+ int arrayLen = 0;
+ while (types[i + arrayLen] != ']')
+ arrayLen++;
+ Object[] array = new Object[arrayLen];
+ for (int j = 0; i < arrayLen; j++) {
+ array[j] = readArgument(types[i + j]);
+ }
+ return array;
+ }
- private int lengthOfCurrentString() {
- int i = 0;
- while (bytes[streamPosition + i] != 0)
- i++;
- return i;
- }
+ private int lengthOfCurrentString() {
+ int i = 0;
+ while (bytes[streamPosition + i] != 0)
+ i++;
+ return i;
+ }
- private void moveToFourByteBoundry() {
- // If i'm already at a 4 byte boundry, I need to move to the next one
- int mod = streamPosition % 4;
- streamPosition += (4 - mod);
- }
+ private void moveToFourByteBoundry() {
+ // If i'm already at a 4 byte boundry, I need to move to the next one
+ int mod = streamPosition % 4;
+ streamPosition += (4 - mod);
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/utility/OSCJavaToByteArrayConverter.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/utility/OSCJavaToByteArrayConverter.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/**
+/**
* @author cramakrishnan
*
* Copyright (C) 2003, C. Ramakrishnan / Illposed Software
@@ -27,284 +27,284 @@
public class OSCJavaToByteArrayConverter {
- protected ByteArrayOutputStream stream = new ByteArrayOutputStream();
- private byte[] intBytes = new byte[4];
+ protected ByteArrayOutputStream stream = new ByteArrayOutputStream();
+ private byte[] intBytes = new byte[4];
- /*public OSCJavaToByteArrayConverter() {
- super();
- }*/
+ /*public OSCJavaToByteArrayConverter() {
+ super();
+ }*/
- /**
- * Creation date: (2/23/2001 2:43:25 AM)
- * @param anArray java.lang.Object[]
- *
- */
- public void appendNullCharToAlignStream() {
- int mod = stream.size() % 4;
- int pad = 4 - mod;
- for (int i = 0; i < pad; i++)
- stream.write(0);
- }
+ /**
+ * Creation date: (2/23/2001 2:43:25 AM)
+ * @param anArray java.lang.Object[]
+ *
+ */
+ public void appendNullCharToAlignStream() {
+ int mod = stream.size() % 4;
+ int pad = 4 - mod;
+ for (int i = 0; i < pad; i++)
+ stream.write(0);
+ }
- /**
- * Creation date: (2/23/2001 2:21:53 AM)
- * @return byte[]
- */
- public byte[] toByteArray() {
- return stream.toByteArray();
- }
+ /**
+ * Creation date: (2/23/2001 2:21:53 AM)
+ * @return byte[]
+ */
+ public byte[] toByteArray() {
+ return stream.toByteArray();
+ }
- /**
- * Creation date: (2/23/2001 2:14:23 AM)
- * @param bytes byte[]
- */
- public void write(byte[] bytes) {
- writeBigEndToFourByteBoundry(bytes);
- }
+ /**
+ * Creation date: (2/23/2001 2:14:23 AM)
+ * @param bytes byte[]
+ */
+ public void write(byte[] bytes) {
+ writeBigEndToFourByteBoundry(bytes);
+ }
- /**
- * Creation date: (2/23/2001 2:21:04 AM)
- * @param i int
- */
- public void write(int i) {
- writeIntegerToByteArray(i);
- }
+ /**
+ * Creation date: (2/23/2001 2:21:04 AM)
+ * @param i int
+ */
+ public void write(int i) {
+ writeIntegerToByteArray(i);
+ }
- /**
- * Creation date: (2/23/2001 2:03:57 AM)
- * @param f java.lang.Float
- */
- public void write(Float f) {
- writeIntegerToByteArray(Float.floatToIntBits(f.floatValue()));
- }
+ /**
+ * Creation date: (2/23/2001 2:03:57 AM)
+ * @param f java.lang.Float
+ */
+ public void write(Float f) {
+ writeIntegerToByteArray(Float.floatToIntBits(f.floatValue()));
+ }
- /**
- * Creation date: (2/23/2001 2:08:36 AM)
- * @param i java.lang.Integer
- */
- public void write(Integer i) {
- writeIntegerToByteArray(i.intValue());
- }
+ /**
+ * Creation date: (2/23/2001 2:08:36 AM)
+ * @param i java.lang.Integer
+ */
+ public void write(Integer i) {
+ writeIntegerToByteArray(i.intValue());
+ }
- /**
- * Creation date: (2/23/2001 1:57:35 AM)
- * @param str java.lang.String
- */
- public void write(String str) {
- writeLittleEndToFourByteBoundry(str.getBytes());
- }
+ /**
+ * Creation date: (2/23/2001 1:57:35 AM)
+ * @param str java.lang.String
+ */
+ public void write(String str) {
+ writeLittleEndToFourByteBoundry(str.getBytes());
+ }
- /**
- * Creation date: (2/23/2001 2:08:36 AM)
- * @param c char
- */
- public void write(char c) {
- stream.write(c);
- }
+ /**
+ * Creation date: (2/23/2001 2:08:36 AM)
+ * @param c char
+ */
+ public void write(char c) {
+ stream.write(c);
+ }
- /**
- * Creation date: (2/23/2001 2:02:54 AM)
- * @param anObject java.lang.Object
- */
- public void write(Object anObject) {
- // Can't do switch on class
- if (null == anObject)
- return;
- if (anObject instanceof Float) {
- write((Float) anObject);
- return;
- }
- if (anObject instanceof String) {
- write((String) anObject);
- return;
- }
- if (anObject instanceof Integer) {
- write((Integer) anObject);
- return;
- }
- }
+ /**
+ * Creation date: (2/23/2001 2:02:54 AM)
+ * @param anObject java.lang.Object
+ */
+ public void write(Object anObject) {
+ // Can't do switch on class
+ if (null == anObject)
+ return;
+ if (anObject instanceof Float) {
+ write((Float) anObject);
+ return;
+ }
+ if (anObject instanceof String) {
+ write((String) anObject);
+ return;
+ }
+ if (anObject instanceof Integer) {
+ write((Integer) anObject);
+ return;
+ }
+ }
- /**
- * Creation date: (2/23/2001 2:43:25 AM)
- * @param aClass Class
- */
- public void writeType(Class c) {
- // A big ol' case statement -- what's polymorphism mean, again?
- // I really wish I could extend the base classes!
+ /**
+ * Creation date: (2/23/2001 2:43:25 AM)
+ * @param aClass Class
+ */
+ public void writeType(Class c) {
+ // A big ol' case statement -- what's polymorphism mean, again?
+ // I really wish I could extend the base classes!
- // use the appropriate flags to tell SuperCollider what kind of
- // thing it is looking at
+ // use the appropriate flags to tell SuperCollider what kind of
+ // thing it is looking at
- if (Integer.class.equals(c)) {
- stream.write('i');
- return;
- }
- if (java.math.BigInteger.class.equals(c)) {
- stream.write('h');
- return;
- }
- if (Float.class.equals(c)) {
- stream.write('f');
- return;
- }
- if (Double.class.equals(c)) {
- stream.write('d');
- return;
- }
- if (String.class.equals(c)) {
- stream.write('s');
- return;
- }
- if (Character.class.equals(c)) {
- stream.write('c');
- return;
- }
- }
+ if (Integer.class.equals(c)) {
+ stream.write('i');
+ return;
+ }
+ if (java.math.BigInteger.class.equals(c)) {
+ stream.write('h');
+ return;
+ }
+ if (Float.class.equals(c)) {
+ stream.write('f');
+ return;
+ }
+ if (Double.class.equals(c)) {
+ stream.write('d');
+ return;
+ }
+ if (String.class.equals(c)) {
+ stream.write('s');
+ return;
+ }
+ if (Character.class.equals(c)) {
+ stream.write('c');
+ return;
+ }
+ }
- /**
- * Creation date: (2/23/2001 2:43:25 AM)
- * @param anArray java.lang.Object[]
- */
- public void writeTypesArray(Object[] array) {
- // A big ol' case statement in a for loop -- what's polymorphism mean, again?
- // I really wish I could extend the base classes!
+ /**
+ * Creation date: (2/23/2001 2:43:25 AM)
+ * @param anArray java.lang.Object[]
+ */
+ public void writeTypesArray(Object[] array) {
+ // A big ol' case statement in a for loop -- what's polymorphism mean, again?
+ // I really wish I could extend the base classes!
- for (int i = 0; i < array.length; i++) {
- if (null == array[i])
- continue;
- // if the array at i is a type of array write a [
- // This is used for nested arguments
- if (array[i].getClass().isArray()) {
- stream.write('[');
- // fill the [] with the SuperCollider types corresponding to the object
- // (i.e. Object of type String needs -s).
- writeTypesArray((Object[]) array[i]);
- // close the array
- stream.write(']');
- continue;
- }
- // Create a way to deal with Boolean type objects
- if (Boolean.TRUE.equals(array[i])) {
- stream.write('T');
- continue;
- }
- if (Boolean.FALSE.equals(array[i])) {
- stream.write('F');
- continue;
- }
- // go through the array and write the superCollider types as shown in the
- // above method. the Classes derived here are used as the arg to the above method
- writeType(array[i].getClass());
- }
- // align the stream with padded bytes
- appendNullCharToAlignStream();
- }
-
- /**
- * Same as writeSuperColliderTypes(Object[]), just that it takes a vector (for jdk1.1
- * compatibility), rather than an array.
- * @param vector the collection I am to write out types for
- */
- public void writeTypes(Vector vector) {
- // A big ol' case statement in a for loop -- what's polymorphism mean, again?
- // I really wish I could extend the base classes!
+ for (int i = 0; i < array.length; i++) {
+ if (null == array[i])
+ continue;
+ // if the array at i is a type of array write a [
+ // This is used for nested arguments
+ if (array[i].getClass().isArray()) {
+ stream.write('[');
+ // fill the [] with the SuperCollider types corresponding to the object
+ // (i.e. Object of type String needs -s).
+ writeTypesArray((Object[]) array[i]);
+ // close the array
+ stream.write(']');
+ continue;
+ }
+ // Create a way to deal with Boolean type objects
+ if (Boolean.TRUE.equals(array[i])) {
+ stream.write('T');
+ continue;
+ }
+ if (Boolean.FALSE.equals(array[i])) {
+ stream.write('F');
+ continue;
+ }
+ // go through the array and write the superCollider types as shown in the
+ // above method. the Classes derived here are used as the arg to the above method
+ writeType(array[i].getClass());
+ }
+ // align the stream with padded bytes
+ appendNullCharToAlignStream();
+ }
+
+ /**
+ * Same as writeSuperColliderTypes(Object[]), just that it takes a vector (for jdk1.1
+ * compatibility), rather than an array.
+ * @param vector the collection I am to write out types for
+ */
+ public void writeTypes(Vector vector) {
+ // A big ol' case statement in a for loop -- what's polymorphism mean, again?
+ // I really wish I could extend the base classes!
- Enumeration enm = vector.elements();
- Object nextObject;
- while (enm.hasMoreElements()) {
- nextObject = enm.nextElement();
- if (null == nextObject)
- continue;
- // if the array at i is a type of array write a [
- // This is used for nested arguments
- if (nextObject.getClass().isArray()) {
- stream.write('[');
- // fill the [] with the SuperCollider types corresponding to the object
- // (e.g., Object of type String needs -s).
- writeTypesArray((Object[]) nextObject);
- // close the array
- stream.write(']');
- continue;
- }
- // Create a way to deal with Boolean type objects
- if (Boolean.TRUE.equals(nextObject)) {
- stream.write('T');
- continue;
- }
- if (Boolean.FALSE.equals(nextObject)) {
- stream.write('F');
- continue;
- }
- // go through the array and write the superCollider types as shown in the
- // above method. the Classes derived here are used as the arg to the above method
- writeType(nextObject.getClass());
- }
- // align the stream with padded bytes
- appendNullCharToAlignStream();
- }
+ Enumeration enm = vector.elements();
+ Object nextObject;
+ while (enm.hasMoreElements()) {
+ nextObject = enm.nextElement();
+ if (null == nextObject)
+ continue;
+ // if the array at i is a type of array write a [
+ // This is used for nested arguments
+ if (nextObject.getClass().isArray()) {
+ stream.write('[');
+ // fill the [] with the SuperCollider types corresponding to the object
+ // (e.g., Object of type String needs -s).
+ writeTypesArray((Object[]) nextObject);
+ // close the array
+ stream.write(']');
+ continue;
+ }
+ // Create a way to deal with Boolean type objects
+ if (Boolean.TRUE.equals(nextObject)) {
+ stream.write('T');
+ continue;
+ }
+ if (Boolean.FALSE.equals(nextObject)) {
+ stream.write('F');
+ continue;
+ }
+ // go through the array and write the superCollider types as shown in the
+ // above method. the Classes derived here are used as the arg to the above method
+ writeType(nextObject.getClass());
+ }
+ // align the stream with padded bytes
+ appendNullCharToAlignStream();
+ }
- /**
- * convert an integer to byte array
- *
- * @param value int
- */
- private void writeIntegerToByteArray(int value) {
- byte[] intBytes = new byte[4];
+ /**
+ * convert an integer to byte array
+ *
+ * @param value int
+ */
+ private void writeIntegerToByteArray(int value) {
+ byte[] intBytes = new byte[4];
- intBytes[3] = (byte)value; value>>>=8;
- intBytes[2] = (byte)value; value>>>=8;
- intBytes[1] = (byte)value; value>>>=8;
- intBytes[0] = (byte)value;
+ intBytes[3] = (byte)value; value>>>=8;
+ intBytes[2] = (byte)value; value>>>=8;
+ intBytes[1] = (byte)value; value>>>=8;
+ intBytes[0] = (byte)value;
- try {
- stream.write(intBytes);
- } catch (IOException e) {
- throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream");
- }
- }
-
- /**
- * Line up the BigEnd of the bytes to a 4 byte boundry
- *
- * @param bytes byte[]
- */
- private void writeBigEndToFourByteBoundry(byte[] bytes) {
- int mod = bytes.length % 4;
- // if the remainder == 0 write the bytes
- if (mod == 0) {
- try { stream.write(bytes); } catch (IOException e)
- { throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream"); }
- return;
- }
- // pad the bytes to lineup correctly
- int pad = 4 - mod;
- byte[] newBytes = new byte[pad + bytes.length];
- System.arraycopy(bytes,0,newBytes,pad,bytes.length);
+ try {
+ stream.write(intBytes);
+ } catch (IOException e) {
+ throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream");
+ }
+ }
+
+ /**
+ * Line up the BigEnd of the bytes to a 4 byte boundry
+ *
+ * @param bytes byte[]
+ */
+ private void writeBigEndToFourByteBoundry(byte[] bytes) {
+ int mod = bytes.length % 4;
+ // if the remainder == 0 write the bytes
+ if (mod == 0) {
+ try { stream.write(bytes); } catch (IOException e)
+ { throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream"); }
+ return;
+ }
+ // pad the bytes to lineup correctly
+ int pad = 4 - mod;
+ byte[] newBytes = new byte[pad + bytes.length];
+ System.arraycopy(bytes,0,newBytes,pad,bytes.length);
- try { stream.write(newBytes); } catch (IOException e)
- { throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream"); }
- }
+ try { stream.write(newBytes); } catch (IOException e)
+ { throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream"); }
+ }
- /**
- * Line up the LittleEnd of the bytes to a 4 byte boundry
- *
- * @param bytes byte[]
- */
- private void writeLittleEndToFourByteBoundry(byte[] bytes) {
- int mod = bytes.length % 4;
- // if the remainder == 0 write the bytes
- if (mod == 4) {
- try { stream.write(bytes); } catch (IOException e)
- { throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream"); }
- return;
- }
- // pad the bytes to lineup correctly
- int pad = 4 - mod;
- byte[] newBytes = new byte[pad + bytes.length];
- System.arraycopy(bytes,0,newBytes,0,bytes.length);
+ /**
+ * Line up the LittleEnd of the bytes to a 4 byte boundry
+ *
+ * @param bytes byte[]
+ */
+ private void writeLittleEndToFourByteBoundry(byte[] bytes) {
+ int mod = bytes.length % 4;
+ // if the remainder == 0 write the bytes
+ if (mod == 4) {
+ try { stream.write(bytes); } catch (IOException e)
+ { throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream"); }
+ return;
+ }
+ // pad the bytes to lineup correctly
+ int pad = 4 - mod;
+ byte[] newBytes = new byte[pad + bytes.length];
+ System.arraycopy(bytes,0,newBytes,0,bytes.length);
- try { stream.write(newBytes); } catch (IOException e)
- { throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream"); }
- }
+ try { stream.write(newBytes); } catch (IOException e)
+ { throw new RuntimeException("You're screwed: IOException writing to a ByteArrayOutputStream"); }
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/utility/OSCPacketDispatcher.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/com/illposed/osc/utility/OSCPacketDispatcher.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/* $Id: OSCPacketDispatcher.java,v 1.2 2008/07/01 15:29:46 modin Exp $
+/* $Id: OSCPacketDispatcher.java,v 1.2 2008/07/01 15:29:46 modin Exp $
* Created on 28.10.2003
*/
package com.illposed.osc.utility;
@@ -22,56 +22,56 @@
*/
public class OSCPacketDispatcher {
- private Hashtable<String,OSCListener> addressToClassTable = new Hashtable<String,OSCListener>();
-
- /**
- *
- */
- public OSCPacketDispatcher() {
- super();
- }
+ private Hashtable<String,OSCListener> addressToClassTable = new Hashtable<String,OSCListener>();
+
+ /**
+ *
+ */
+ public OSCPacketDispatcher() {
+ super();
+ }
- public void addListener(String address, OSCListener listener) {
- addressToClassTable.put(address, listener);
- }
-
- public void dispatchPacket(OSCPacket packet) {
- if (packet instanceof OSCBundle)
- dispatchBundle((OSCBundle) packet);
- else
- dispatchMessage((OSCMessage) packet);
- }
-
- public void dispatchPacket(OSCPacket packet, Date timestamp) {
- if (packet instanceof OSCBundle)
- dispatchBundle((OSCBundle) packet);
- else
- dispatchMessage((OSCMessage) packet, timestamp);
- }
-
- private void dispatchBundle(OSCBundle bundle) {
- Date timestamp = bundle.getTimestamp();
- OSCPacket[] packets = bundle.getPackets();
- for (int i = 0; i < packets.length; i++) {
- dispatchPacket(packets[i], timestamp);
- }
- }
-
- private void dispatchMessage(OSCMessage message) {
- dispatchMessage(message, null);
- }
-
- private void dispatchMessage(OSCMessage message, Date time) {
- Enumeration keys = addressToClassTable.keys();
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- // this supports the OSC regexp facility, but it
- // only works in JDK 1.4, so don't support it right now
- // if (key.matches(message.getAddress())) {
- if (key.equals(message.getAddress())) {
- OSCListener listener = (OSCListener) addressToClassTable.get(key);
- listener.acceptMessage(time, message);
- }
- }
- }
+ public void addListener(String address, OSCListener listener) {
+ addressToClassTable.put(address, listener);
+ }
+
+ public void dispatchPacket(OSCPacket packet) {
+ if (packet instanceof OSCBundle)
+ dispatchBundle((OSCBundle) packet);
+ else
+ dispatchMessage((OSCMessage) packet);
+ }
+
+ public void dispatchPacket(OSCPacket packet, Date timestamp) {
+ if (packet instanceof OSCBundle)
+ dispatchBundle((OSCBundle) packet);
+ else
+ dispatchMessage((OSCMessage) packet, timestamp);
+ }
+
+ private void dispatchBundle(OSCBundle bundle) {
+ Date timestamp = bundle.getTimestamp();
+ OSCPacket[] packets = bundle.getPackets();
+ for (int i = 0; i < packets.length; i++) {
+ dispatchPacket(packets[i], timestamp);
+ }
+ }
+
+ private void dispatchMessage(OSCMessage message) {
+ dispatchMessage(message, null);
+ }
+
+ private void dispatchMessage(OSCMessage message, Date time) {
+ Enumeration keys = addressToClassTable.keys();
+ while (keys.hasMoreElements()) {
+ String key = (String) keys.nextElement();
+ // this supports the OSC regexp facility, but it
+ // only works in JDK 1.4, so don't support it right now
+ // if (key.matches(message.getAddress())) {
+ if (key.equals(message.getAddress())) {
+ OSCListener listener = (OSCListener) addressToClassTable.get(key);
+ listener.acceptMessage(time, message);
+ }
+ }
+ }
}
--- a/front_processing/extern/TUIO_JAVA/src/compile.bat Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/compile.bat Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-javac -O -source 1.5 -target 1.5 -cp . *.java TUIO\*.java com\illposed\osc\*.java
+javac -O -source 1.5 -target 1.5 -cp . *.java TUIO\*.java com\illposed\osc\*.java
jar cfm ..\TuioDemo.jar manifest.inc *.class TUIO\*.class com\illposed\osc\*.class com\illposed\osc\utility\*.class
jar cf ..\libTUIO.jar TUIO\*.class com\illposed\osc\*.class com\illposed\osc\utility\*.class
del *.class TUIO\*.class com\illposed\osc\*.class com\illposed\osc\utility\*.class
--- a/front_processing/extern/TUIO_JAVA/src/compile.sh Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/compile.sh Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh
cd src
javac -Xlint:unchecked -O -source 1.5 -target 1.5 -cp . *.java TUIO/*.java com/illposed/osc/*.java
jar cfm ../TuioDemo.jar manifest.inc *.class TUIO/*.class com/illposed/osc/*.class com/illposed/osc/utility/*.class
--- a/front_processing/extern/TUIO_JAVA/src/doc.sh Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/doc.sh Thu Mar 22 18:15:53 2012 +0100
@@ -1,3 +1,3 @@
-#!/bin/sh
+#!/bin/sh
javadoc -d doc -sourcepath src TUIO
--- a/front_processing/extern/TUIO_JAVA/src/manifest.inc Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_JAVA/src/manifest.inc Thu Mar 22 18:15:53 2012 +0100
@@ -1,3 +1,3 @@
-Main-Class: TuioDemo
+Main-Class: TuioDemo
--- a/front_processing/extern/TUIO_PROCESSING/src/LICENSE.txt Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_PROCESSING/src/LICENSE.txt Thu Mar 22 18:15:53 2012 +0100
@@ -1,12 +1,12 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
@@ -56,7 +56,7 @@
The precise terms and conditions for copying, distribution and
modification follow.
- GNU GENERAL PUBLIC LICENSE
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
@@ -255,7 +255,7 @@
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -277,9 +277,9 @@
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
- How to Apply These Terms to Your New Programs
+ How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
--- a/front_processing/extern/TUIO_PROCESSING/src/TUIO/TuioProcessing.java Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_PROCESSING/src/TUIO/TuioProcessing.java Thu Mar 22 18:15:53 2012 +0100
@@ -1,8 +1,8 @@
-/*
- TUIO processing library - part of the reacTIVision project
- http://reactivision.sourceforge.net/
+/*
+ TUIO processing library - part of the reacTIVision project
+ http://reactivision.sourceforge.net/
- Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
+ Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,259 +27,259 @@
import java.util.*;
public class TuioProcessing implements TuioListener {
-
- private PApplet parent;
- private Method addTuioObject, removeTuioObject, updateTuioObject, addTuioCursor, removeTuioCursor, updateTuioCursor, addTuioString, removeTuioString, updateTuioString, refresh;
- private TuioClient client;
-
- public TuioProcessing(PApplet parent) {
- this(parent,3333);
- }
-
- public TuioProcessing(PApplet parent, int port) {
- this.parent = parent;
- parent.registerDispose(this);
-
- try { refresh = parent.getClass().getMethod("refresh",new Class[] { TuioTime.class } ); }
- catch (Exception e) {
- System.out.println("TUIO: missing or wrong 'refresh(TuioTime bundleTime)' method implementation");
- refresh = null;
- }
-
- try { addTuioObject = parent.getClass().getMethod("addTuioObject", new Class[] { TuioObject.class }); }
- catch (Exception e) {
- System.out.println("TUIO: missing or wrong 'addTuioObject(TuioObject tobj)' method implementation");
- addTuioObject = null;
- }
-
- try { removeTuioObject = parent.getClass().getMethod("removeTuioObject", new Class[] { TuioObject.class }); }
- catch (Exception e) {
- System.out.println("TUIO: missing or wrong 'removeTuioObject(TuioObject tobj)' method implementation");
- removeTuioObject = null;
- }
-
- try { updateTuioObject = parent.getClass().getMethod("updateTuioObject", new Class[] { TuioObject.class }); }
- catch (Exception e) {
- System.out.println("TUIO: missing or wrong 'updateTuioObject(TuioObject tobj)' method implementation");
- updateTuioObject = null;
- }
-
- try { addTuioCursor = parent.getClass().getMethod("addTuioCursor", new Class[] { TuioCursor.class }); }
- catch (Exception e) {
- System.out.println("TUIO: missing or wrong 'addTuioCursor(TuioCursor tcur)' method implementation");
- addTuioCursor = null;
- }
-
- try { removeTuioCursor = parent.getClass().getMethod("removeTuioCursor", new Class[] { TuioCursor.class }); }
- catch (Exception e) {
- System.out.println("TUIO:missing or wrong 'removeTuioCursor(TuioCursor tcur)' method implementation");
- removeTuioCursor = null;
- }
-
- try { updateTuioCursor = parent.getClass().getMethod("updateTuioCursor", new Class[] { TuioCursor.class }); }
- catch (Exception e) {
- System.out.println("TUIO: missing or wrong 'updateTuioCursor(TuioCursor tcur)' method implementation");
- updateTuioCursor = null;
- }
-
- try { addTuioString = parent.getClass().getMethod("addTuioString", new Class[] { TuioString.class }); }
- catch (Exception e) {
- System.out.println("TUIO: missing or wrong 'addTuioString(TuioString tstr)' method implementation");
- addTuioString = null;
- }
-
- try { removeTuioString = parent.getClass().getMethod("removeTuioString", new Class[] { TuioString.class }); }
- catch (Exception e) {
- System.out.println("TUIO:missing or wrong 'removeTuioString(TuioString tstr)' method implementation");
- removeTuioString = null;
- }
-
- try { updateTuioString = parent.getClass().getMethod("updateTuioString", new Class[] { TuioString.class }); }
- catch (Exception e) {
- System.out.println("TUIO: missing or wrong 'updateTuioString(TuioString tstr)' method implementation");
- updateTuioString = null;
- }
-
- client = new TuioClient(port);
- client.addTuioListener(this);
- client.connect();
- }
+
+ private PApplet parent;
+ private Method addTuioObject, removeTuioObject, updateTuioObject, addTuioCursor, removeTuioCursor, updateTuioCursor, addTuioString, removeTuioString, updateTuioString, refresh;
+ private TuioClient client;
+
+ public TuioProcessing(PApplet parent) {
+ this(parent,3333);
+ }
+
+ public TuioProcessing(PApplet parent, int port) {
+ this.parent = parent;
+ parent.registerDispose(this);
+
+ try { refresh = parent.getClass().getMethod("refresh",new Class[] { TuioTime.class } ); }
+ catch (Exception e) {
+ System.out.println("TUIO: missing or wrong 'refresh(TuioTime bundleTime)' method implementation");
+ refresh = null;
+ }
+
+ try { addTuioObject = parent.getClass().getMethod("addTuioObject", new Class[] { TuioObject.class }); }
+ catch (Exception e) {
+ System.out.println("TUIO: missing or wrong 'addTuioObject(TuioObject tobj)' method implementation");
+ addTuioObject = null;
+ }
+
+ try { removeTuioObject = parent.getClass().getMethod("removeTuioObject", new Class[] { TuioObject.class }); }
+ catch (Exception e) {
+ System.out.println("TUIO: missing or wrong 'removeTuioObject(TuioObject tobj)' method implementation");
+ removeTuioObject = null;
+ }
+
+ try { updateTuioObject = parent.getClass().getMethod("updateTuioObject", new Class[] { TuioObject.class }); }
+ catch (Exception e) {
+ System.out.println("TUIO: missing or wrong 'updateTuioObject(TuioObject tobj)' method implementation");
+ updateTuioObject = null;
+ }
+
+ try { addTuioCursor = parent.getClass().getMethod("addTuioCursor", new Class[] { TuioCursor.class }); }
+ catch (Exception e) {
+ System.out.println("TUIO: missing or wrong 'addTuioCursor(TuioCursor tcur)' method implementation");
+ addTuioCursor = null;
+ }
+
+ try { removeTuioCursor = parent.getClass().getMethod("removeTuioCursor", new Class[] { TuioCursor.class }); }
+ catch (Exception e) {
+ System.out.println("TUIO:missing or wrong 'removeTuioCursor(TuioCursor tcur)' method implementation");
+ removeTuioCursor = null;
+ }
+
+ try { updateTuioCursor = parent.getClass().getMethod("updateTuioCursor", new Class[] { TuioCursor.class }); }
+ catch (Exception e) {
+ System.out.println("TUIO: missing or wrong 'updateTuioCursor(TuioCursor tcur)' method implementation");
+ updateTuioCursor = null;
+ }
+
+ try { addTuioString = parent.getClass().getMethod("addTuioString", new Class[] { TuioString.class }); }
+ catch (Exception e) {
+ System.out.println("TUIO: missing or wrong 'addTuioString(TuioString tstr)' method implementation");
+ addTuioString = null;
+ }
+
+ try { removeTuioString = parent.getClass().getMethod("removeTuioString", new Class[] { TuioString.class }); }
+ catch (Exception e) {
+ System.out.println("TUIO:missing or wrong 'removeTuioString(TuioString tstr)' method implementation");
+ removeTuioString = null;
+ }
+
+ try { updateTuioString = parent.getClass().getMethod("updateTuioString", new Class[] { TuioString.class }); }
+ catch (Exception e) {
+ System.out.println("TUIO: missing or wrong 'updateTuioString(TuioString tstr)' method implementation");
+ updateTuioString = null;
+ }
+
+ client = new TuioClient(port);
+ client.addTuioListener(this);
+ client.connect();
+ }
- public void addTuioObject(TuioObject tobj) {
- if (addTuioObject!=null) {
- try {
- addTuioObject.invoke(parent, new Object[] { tobj });
- }
- catch (IllegalAccessException e) {}
- catch (IllegalArgumentException e) {}
- catch (InvocationTargetException e) {}
- }
- }
-
- public void updateTuioObject(TuioObject tobj) {
-
- if (updateTuioObject!=null) {
- try {
- updateTuioObject.invoke(parent, new Object[] { tobj });
- }
- catch (IllegalAccessException e) {}
- catch (IllegalArgumentException e) {}
- catch (InvocationTargetException e) {}
- }
- }
-
- public void removeTuioObject(TuioObject tobj) {
- if (removeTuioObject!=null) {
- try {
- removeTuioObject.invoke(parent, new Object[] { tobj });
- }
- catch (IllegalAccessException e) {}
- catch (IllegalArgumentException e) {}
- catch (InvocationTargetException e) {}
- }
- }
-
- public void addTuioCursor(TuioCursor tcur) {
- if (addTuioCursor!=null) {
- try {
- addTuioCursor.invoke(parent, new Object[] { tcur });
- }
- catch (IllegalAccessException e) {}
- catch (IllegalArgumentException e) {}
- catch (InvocationTargetException e) {}
- }
- }
-
- public void updateTuioCursor(TuioCursor tcur) {
- if (updateTuioCursor!=null) {
- try {
- updateTuioCursor.invoke(parent, new Object[] { tcur });
- }
- catch (IllegalAccessException e) {}
- catch (IllegalArgumentException e) {}
- catch (InvocationTargetException e) {}
- }
- }
-
- public void removeTuioCursor(TuioCursor tcur) {
- if (removeTuioCursor!=null) {
- try {
- removeTuioCursor.invoke(parent, new Object[] { tcur });
- }
- catch (IllegalAccessException e) {}
- catch (IllegalArgumentException e) {}
- catch (InvocationTargetException e) {}
- }
- }
-
- public void addTuioString(TuioString tstr) {
- if (addTuioString!=null) {
- try {
- addTuioString.invoke(parent, new Object[] { tstr });
- }
- catch (IllegalAccessException e) {}
- catch (IllegalArgumentException e) {}
- catch (InvocationTargetException e) {}
- }
- }
-
- public void updateTuioString(TuioString tstr) {
- if (updateTuioString!=null) {
- try {
- updateTuioString.invoke(parent, new Object[] { tstr });
- }
- catch (IllegalAccessException e) {}
- catch (IllegalArgumentException e) {}
- catch (InvocationTargetException e) {}
- }
- }
-
- public void removeTuioString(TuioString tstr) {
- if (removeTuioString!=null) {
- try {
- removeTuioString.invoke(parent, new Object[] { tstr });
- }
- catch (IllegalAccessException e) {}
- catch (IllegalArgumentException e) {}
- catch (InvocationTargetException e) {}
- }
- }
-
- public void refresh(TuioTime bundleTime) {
- if (refresh!=null) {
- try {
- refresh.invoke(parent,new Object[] { bundleTime });
- }
- catch (IllegalAccessException e) {}
- catch (IllegalArgumentException e) {}
- catch (InvocationTargetException e) {}
- }
- }
-
- public Vector getTuioObjects() {
- return client.getTuioObjects();
- }
-
- public Vector getTuioCursors() {
- return client.getTuioCursors();
- }
-
- public Vector getTuioStrings() {
- return client.getTuioStrings();
- }
-
- public TuioObject getTuioObject(long s_id) {
- return client.getTuioObject(s_id);
- }
-
- public TuioCursor getTuioCursor(long s_id) {
- return client.getTuioCursor(s_id);
- }
-
- public TuioString getTuioString(long s_id) {
- return client.getTuioString(s_id);
- }
-
- public void pre() {
- //method that's called just after beginFrame(), meaning that it
- //can affect drawing.
- }
+ public void addTuioObject(TuioObject tobj) {
+ if (addTuioObject!=null) {
+ try {
+ addTuioObject.invoke(parent, new Object[] { tobj });
+ }
+ catch (IllegalAccessException e) {}
+ catch (IllegalArgumentException e) {}
+ catch (InvocationTargetException e) {}
+ }
+ }
+
+ public void updateTuioObject(TuioObject tobj) {
+
+ if (updateTuioObject!=null) {
+ try {
+ updateTuioObject.invoke(parent, new Object[] { tobj });
+ }
+ catch (IllegalAccessException e) {}
+ catch (IllegalArgumentException e) {}
+ catch (InvocationTargetException e) {}
+ }
+ }
+
+ public void removeTuioObject(TuioObject tobj) {
+ if (removeTuioObject!=null) {
+ try {
+ removeTuioObject.invoke(parent, new Object[] { tobj });
+ }
+ catch (IllegalAccessException e) {}
+ catch (IllegalArgumentException e) {}
+ catch (InvocationTargetException e) {}
+ }
+ }
+
+ public void addTuioCursor(TuioCursor tcur) {
+ if (addTuioCursor!=null) {
+ try {
+ addTuioCursor.invoke(parent, new Object[] { tcur });
+ }
+ catch (IllegalAccessException e) {}
+ catch (IllegalArgumentException e) {}
+ catch (InvocationTargetException e) {}
+ }
+ }
+
+ public void updateTuioCursor(TuioCursor tcur) {
+ if (updateTuioCursor!=null) {
+ try {
+ updateTuioCursor.invoke(parent, new Object[] { tcur });
+ }
+ catch (IllegalAccessException e) {}
+ catch (IllegalArgumentException e) {}
+ catch (InvocationTargetException e) {}
+ }
+ }
+
+ public void removeTuioCursor(TuioCursor tcur) {
+ if (removeTuioCursor!=null) {
+ try {
+ removeTuioCursor.invoke(parent, new Object[] { tcur });
+ }
+ catch (IllegalAccessException e) {}
+ catch (IllegalArgumentException e) {}
+ catch (InvocationTargetException e) {}
+ }
+ }
+
+ public void addTuioString(TuioString tstr) {
+ if (addTuioString!=null) {
+ try {
+ addTuioString.invoke(parent, new Object[] { tstr });
+ }
+ catch (IllegalAccessException e) {}
+ catch (IllegalArgumentException e) {}
+ catch (InvocationTargetException e) {}
+ }
+ }
+
+ public void updateTuioString(TuioString tstr) {
+ if (updateTuioString!=null) {
+ try {
+ updateTuioString.invoke(parent, new Object[] { tstr });
+ }
+ catch (IllegalAccessException e) {}
+ catch (IllegalArgumentException e) {}
+ catch (InvocationTargetException e) {}
+ }
+ }
+
+ public void removeTuioString(TuioString tstr) {
+ if (removeTuioString!=null) {
+ try {
+ removeTuioString.invoke(parent, new Object[] { tstr });
+ }
+ catch (IllegalAccessException e) {}
+ catch (IllegalArgumentException e) {}
+ catch (InvocationTargetException e) {}
+ }
+ }
+
+ public void refresh(TuioTime bundleTime) {
+ if (refresh!=null) {
+ try {
+ refresh.invoke(parent,new Object[] { bundleTime });
+ }
+ catch (IllegalAccessException e) {}
+ catch (IllegalArgumentException e) {}
+ catch (InvocationTargetException e) {}
+ }
+ }
+
+ public Vector getTuioObjects() {
+ return client.getTuioObjects();
+ }
+
+ public Vector getTuioCursors() {
+ return client.getTuioCursors();
+ }
+
+ public Vector getTuioStrings() {
+ return client.getTuioStrings();
+ }
+
+ public TuioObject getTuioObject(long s_id) {
+ return client.getTuioObject(s_id);
+ }
+
+ public TuioCursor getTuioCursor(long s_id) {
+ return client.getTuioCursor(s_id);
+ }
+
+ public TuioString getTuioString(long s_id) {
+ return client.getTuioString(s_id);
+ }
+
+ public void pre() {
+ //method that's called just after beginFrame(), meaning that it
+ //can affect drawing.
+ }
- public void draw() {
- //method that's called at the end of draw(), but before endFrame().
- }
-
- public void mouseEvent(MouseEvent e) {
- //called when a mouse event occurs in the parent applet
- }
-
- public void keyEvent(KeyEvent e) {
- //called when a key event occurs in the parent applet
- }
-
- public void post() {
- //method called after draw has completed and the frame is done.
- //no drawing allowed.
- }
-
- public void size(int width, int height) {
- //this will be called the first time an applet sets its size, but
- //also any time that it's called while the PApplet is running.
- }
-
- public void stop() {
- //can be called by users, for instance movie.stop() will shut down
- //a movie that's being played, or camera.stop() stops capturing
- //video. server.stop() will shut down the server and shut it down
- //completely, which is identical to its "dispose" function.
- }
-
- public void dispose() {
-
- if (client.isConnected()) client.disconnect();
-
- //this should only be called by PApplet. dispose() is what gets
- //called when the host applet is stopped, so this should shut down
- //any threads, disconnect from the net, unload memory, etc.
- }
+ public void draw() {
+ //method that's called at the end of draw(), but before endFrame().
+ }
+
+ public void mouseEvent(MouseEvent e) {
+ //called when a mouse event occurs in the parent applet
+ }
+
+ public void keyEvent(KeyEvent e) {
+ //called when a key event occurs in the parent applet
+ }
+
+ public void post() {
+ //method called after draw has completed and the frame is done.
+ //no drawing allowed.
+ }
+
+ public void size(int width, int height) {
+ //this will be called the first time an applet sets its size, but
+ //also any time that it's called while the PApplet is running.
+ }
+
+ public void stop() {
+ //can be called by users, for instance movie.stop() will shut down
+ //a movie that's being played, or camera.stop() stops capturing
+ //video. server.stop() will shut down the server and shut it down
+ //completely, which is identical to its "dispose" function.
+ }
+
+ public void dispose() {
+
+ if (client.isConnected()) client.disconnect();
+
+ //this should only be called by PApplet. dispose() is what gets
+ //called when the host applet is stopped, so this should shut down
+ //any threads, disconnect from the net, unload memory, etc.
+ }
}
--- a/front_processing/extern/TUIO_PROCESSING/src/compile.bat Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_PROCESSING/src/compile.bat Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-rem javac -O -source 1.4 -target 1.4 -cp TUIO\libTUIO.jar:TUIO\core.jar TUIO\*.java
+rem javac -O -source 1.4 -target 1.4 -cp TUIO\libTUIO.jar:TUIO\core.jar TUIO\*.java
rem javaw -Dfile.encoding=Cp1252 -classpath C:\Users\bastiena\Documents\processing-1.5.1-windows-expert\processing-1.5.1\lib\core.jar;..\TUIO_JAVA\libTUIO.jar processing.core.PApplet
javac -O -source 1.4 -target 1.4 -cp ..\library\libTUIO.jar;..\..\..\..\..\IDILL\DEV\TUIO_Processing-1.4\TUIO_Processing\library\core.jar TUIO\*.java
--- a/front_processing/extern/TUIO_PROCESSING/src/compile.sh Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_PROCESSING/src/compile.sh Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh
javac -Xlint:unchecked -O -source 1.4 -target 1.4 -cp ../library/libTUIO.jar:core.jar TUIO/*.java
jar cfm ../library/TUIO.jar manifest.inc TUIO/*.class
rm -f TUIO/*.class
--- a/front_processing/extern/TUIO_PROCESSING/src/manifest.inc Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/extern/TUIO_PROCESSING/src/manifest.inc Thu Mar 22 18:15:53 2012 +0100
@@ -1,1 +1,1 @@
-Class-Path: libTUIO.jar
+Class-Path: libTUIO.jar
--- a/front_processing/src/Fluid_manipulation/Fluid_manipulation.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Fluid_manipulation/Fluid_manipulation.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Fluid_manipulation/TuioFunctions.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Fluid_manipulation/TuioFunctions.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Fluid_manipulation/particle.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Fluid_manipulation/particle.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
@@ -62,4 +62,4 @@
xvel *= 0.5;
yvel *= 0.5;
}
-}
+}
--- a/front_processing/src/Fluid_manipulation/vbuffer.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Fluid_manipulation/vbuffer.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
@@ -34,4 +34,4 @@
pressure = (pressurex + pressurey)*0.25;
}
}
-}
+}
--- a/front_processing/src/Fluid_manipulation/vsquare.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Fluid_manipulation/vsquare.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Interaction_examples/Hand_press/Hand_press.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Interaction_examples/Hand_press/Hand_press.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Interaction_examples/Hand_press/TuioFunctions.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Interaction_examples/Hand_press/TuioFunctions.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Interaction_examples/Hand_signal/Hand_signal.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Interaction_examples/Hand_signal/Hand_signal.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Interaction_examples/Hand_signal/TuioFunctions.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Interaction_examples/Hand_signal/TuioFunctions.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Interaction_examples/Hands_1D/Hands_1D.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Interaction_examples/Hands_1D/Hands_1D.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Interaction_examples/Hands_1D/TuioFunctions.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Interaction_examples/Hands_1D/TuioFunctions.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Interaction_examples/Hands_2D/Hands_2D.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Interaction_examples/Hands_2D/Hands_2D.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Interaction_examples/Hands_2D/TuioFunctions.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Interaction_examples/Hands_2D/TuioFunctions.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Smoke_manipulation/Smoke_manipulation.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Smoke_manipulation/Smoke_manipulation.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
@@ -132,4 +132,4 @@
{
pt1 = _pt1;
pt2 = _pt2;
-}
+}
--- a/front_processing/src/Smoke_manipulation/TuioFunctions.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Smoke_manipulation/TuioFunctions.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Smoke_manipulation/particle.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Smoke_manipulation/particle.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
@@ -65,4 +65,4 @@
xvel *= 0.6;
yvel *= 0.6;
}
-}
+}
--- a/front_processing/src/Smoke_manipulation/vbuffer.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Smoke_manipulation/vbuffer.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
@@ -31,4 +31,4 @@
pressure = (pressurex + pressurey)*0.25;
}
}
-}
+}
--- a/front_processing/src/Smoke_manipulation/vsquare.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Smoke_manipulation/vsquare.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
@@ -91,4 +91,4 @@
rect(x,y,RES,RES);
col = 0;
}
-}
+}
--- a/front_processing/src/Trakers/Trakers.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Trakers/Trakers.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Trakers/TuioFunctions.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Trakers/TuioFunctions.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Trakers_gestures/Trakers_gestures.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Trakers_gestures/Trakers_gestures.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*
+/*
* This file is part of the TraKERS\Front Processing package.
*
* (c) IRI <http://www.iri.centrepompidou.fr/>
--- a/front_processing/src/Trakers_gestures/TuioFunctions.pde Thu Mar 22 16:00:17 2012 +0100
+++ b/front_processing/src/Trakers_gestures/TuioFunctions.pde Thu Mar 22 18:15:53 2012 +0100
@@ -1,4 +1,4 @@
-/*FONCTION DE RECEPTION DES MESSAGES OSC
+/*FONCTION DE RECEPTION DES MESSAGES OSC
Entrée :
Sortie : Appel aux différentes fonctions de dessin si un message est reçu*/
void tuioInput()
--- a/middleware/dist/TraKERS.iss Thu Mar 22 16:00:17 2012 +0100
+++ b/middleware/dist/TraKERS.iss Thu Mar 22 18:15:53 2012 +0100
@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "TraKERS"
-#define MyAppVersion "1.0"
+#define MyAppVersion "1.1"
#define MyAppPublisher "IRI"
[Setup]
@@ -29,15 +29,48 @@
Filename: "{app}\Dependancies\dotNetFx40_Client_x86_x64.exe"
[Files]
-Source: "C:\Users\bastiena\Desktop\TraKERS\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: "C:\Users\bastiena\Desktop\TraKERS\Dependancies\dotNetFx40_Client_x86_x64.exe"; Flags: dontcopy
+Source: "C:\Users\bastiena\Documents\trakers\*.txt"; DestDir: "{app}\"; Flags: ignoreversion
+
+Source: "C:\Users\bastiena\Documents\trakers\middleware\dist\dotNetFx40_Client_x86_x64.exe"; DestDir: "{app}\Dependancies\"; Flags: ignoreversion
+
+Source: "C:\Users\bastiena\Documents\trakers\middleware\lib\*"; DestDir: "{app}\Middleware\lib\"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\Communication\*"; DestDir: "{app}\Middleware\src\Communication\"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\Debug\*"; DestDir: "{app}\Middleware\src\Debug\"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\Properties\*"; DestDir: "{app}\Middleware\src\Properties\"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\Tracking\*"; DestDir: "{app}\Middleware\src\Tracking\"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\App.config"; DestDir: "{app}\Middleware\src\"; Flags: ignoreversion
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\MainClass.cs"; DestDir: "{app}\Middleware\src\"; Flags: ignoreversion
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\Trakers.csproj"; DestDir: "{app}\Middleware\src\"; Flags: ignoreversion
+Source: "C:\Users\bastiena\Documents\trakers\middleware\Trakers.sln"; DestDir: "{app}\Middleware\"; Flags: ignoreversion
+
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\bin\Release\Bespoke.Common.dll"; DestDir: "{app}\Middleware\"; Flags: ignoreversion
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\bin\Release\Bespoke.Common.Osc.dll"; DestDir: "{app}\Middleware\"; Flags: ignoreversion
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\bin\Release\Coding4Fun.Kinect.Wpf.dll"; DestDir: "{app}\Middleware\"; Flags: ignoreversion
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\bin\Release\TuioServer.dll"; DestDir: "{app}\Middleware\"; Flags: ignoreversion
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\bin\Release\Trakers.exe.Config"; DestDir: "{app}\Middleware\"; Flags: ignoreversion
+Source: "C:\Users\bastiena\Documents\trakers\middleware\src\bin\Release\Trakers.exe"; DestDir: "{app}\Middleware\"; Flags: ignoreversion
+
+Source: "C:\Users\bastiena\Documents\trakers\front_processing\doc\*"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "C:\Users\bastiena\Documents\trakers\front_processing\src\*"; DestDir: "{app}\Front Processing\src\"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{group}\{#MyAppName}\Middleware"; Filename: "{app}\Middleware\Trakers.exe"
-Name: "{group}\{#MyAppName}\Hand Pointing"; Filename: "{app}\Front Processing\Trakers\application.windows\Trakers.exe"
-Name: "{group}\{#MyAppName}\Gesture Recognition"; Filename: "{app}\Front Processing\Trakers_gestures\application.windows\Trakers_gestures.exe"
+Name: "{group}\{#MyAppName}\Hand Pointing"; Filename: "{app}\Front Processing\src\Trakers\application.windows\Trakers.exe"
+Name: "{group}\{#MyAppName}\Gesture Recognition"; Filename: "{app}\Front Processing\src\Trakers_gestures\application.windows\Trakers_gestures.exe"
+Name: "{group}\{#MyAppName}\Fluid Manipulation"; Filename: "{app}\Front Processing\src\Fluid_manipulation\application.windows\Fluid_manipulation.exe"
+Name: "{group}\{#MyAppName}\Smoke Manipulation"; Filename: "{app}\Front Processing\src\Smoke_manipulation\application.windows\Smoke_manipulation.exe"
+Name: "{group}\{#MyAppName}\Hand Press"; Filename: "{app}\Front Processing\src\Interaction_examples\Hand_press\application.windows\Hand_press.exe"
+Name: "{group}\{#MyAppName}\Hand Signal"; Filename: "{app}\Front Processing\src\Interaction_examples\Hand_signal\application.windows\Hand_signal.exe"
+Name: "{group}\{#MyAppName}\Hands 1D"; Filename: "{app}\Front Processing\src\Interaction_examples\Hands_1D\application.windows\Hands_1D.exe"
+Name: "{group}\{#MyAppName}\Hands 2D"; Filename: "{app}\Front Processing\src\Interaction_examples\Hands_2D\application.windows\Hands_2D.exe"
Name: "{commondesktop}\TraKERS - Middleware"; Filename: "{app}\Middleware\Trakers.exe"
-Name: "{commondesktop}\TraKERS - Hand Pointing"; Filename: "{app}\Front Processing\Trakers\application.windows\Trakers.exe"
-Name: "{commondesktop}\TraKERS - Gesture Recognition"; Filename: "{app}\Front Processing\Trakers_gestures\application.windows\Trakers_gestures.exe"
+Name: "{commondesktop}\TraKERS - Hand Pointing"; Filename: "{app}\Front Processing\src\Trakers\application.windows\Trakers.exe"
+Name: "{commondesktop}\TraKERS - Gesture Recognition"; Filename: "{app}\Front Processing\src\Trakers_gestures\application.windows\Trakers_gestures.exe"
+Name: "{commondesktop}\TraKERS - Fluid Manipulation"; Filename: "{app}\Front Processing\src\Fluid_manipulation\application.windows\Fluid_manipulation.exe"
+Name: "{commondesktop}\TraKERS - Smoke Manipulation"; Filename: "{app}\Front Processing\src\Smoke_manipulation\application.windows\Smoke_manipulation.exe"
+Name: "{commondesktop}\TraKERS - Hand Press"; Filename: "{app}\Front Processing\src\Interaction_examples\Hand_press\application.windows\Hand_press.exe"
+Name: "{commondesktop}\TraKERS - Hand Signal"; Filename: "{app}\Front Processing\src\Interaction_examples\Hand_signal\application.windows\Hand_signal.exe"
+Name: "{commondesktop}\TraKERS - Hands 1D"; Filename: "{app}\Front Processing\src\Interaction_examples\Hands_1D\application.windows\Hands_1D.exe"
+Name: "{commondesktop}\TraKERS - Hands 2D"; Filename: "{app}\Front Processing\src\Interaction_examples\Hands_2D\application.windows\Hands_2D.exe"
\ No newline at end of file
--- a/middleware/doc/readme.txt Thu Mar 22 16:00:17 2012 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-TraKERS (Tracking using Kinect and Extracting Robust Skeletons) est une interface basée sur la détection de gestures / positions du squelette envoyé par le SDK Microsoft (1.0) de Kinect.
-
-Auteur : Alexandre BASTIEN.
-
-I) TraKERS - Eléments requis :
-
-Les spécifications de Microsoft font état des éléments matériels et logiciels requis afin de pouvoir utiliser le SDK :
-
-Besoins matériels :
- Capteur Kinect.
- Processeur32-bit (x86) ou 64-bit (x64).
- Dual-core 2.66-GHz ou plus rapide.
- Bus USB 2.0 dédié.
- 2 GB RAM.
-Besoins logiciels :
- Microsoft® Visual Studio® 2010 Express ou une autre édition de Visual Studio 2010 (si vous souhaitez développer).
- Windows 7.
- NET Framework 4.0.
-
-Vous les trouverez ici si vous le souhaitez : http://www.microsoft.com/en-us/kinectforwindows/develop/release-notes.aspx
-
-La version 4.0 du Framework est présente dans l'installation de TraKERS.
-Néanmoins, par soucis de taille de l'installeur, il vous sera nécessaire d'installer le SDK 1.0 de Microsoft ici :
-http://www.microsoft.com/en-us/kinectforwindows/develop/overview.aspx
-
-II) TraKERS - Structure :
-
-TraKERS v1.0 est composé de deux modules, le Middleware (utilisant la Kinect afin de détecter des gestes et de suivre la position des mains et le Front (développé en Processing), permettant de récupérer les messages OSC du Middleware. Pour plus d'informations sur le Front, veuillez consulter la documentation située dans le dossier Front Processing.
-
-Afin de permettre au Middleware d'envoyer des messages au Front, un client TUIO a été installé dans le Front et un serveur TUIO dans le Middleware.
-
-Le middleware dispose d'une interface de debug permettant de connaître en temps réel la position de l'utilisateur à la Kinect. Ces fonctionnalités seront vues plus avant dans la partie Utilisation.
-
-Les sources des modules sont fournies lors de l'installation, n'hésitez pas à les consulter si besoin est.
-
-III) TraKERS - Utilisation :
-
-Vous pouvez démarrer le Middleware ou bien le Front dans l'ordre que vous voulez.
-Lorsque le Middleware est démarré, la Kinect ne s'allume pas encore. Il faut pour cela appuyer sur le bouton ON en bas de la fenêtre de debug. Le capteur (situé le plus à gauche sur la Kinect) va alors s'allumer en rouge, signe que vous serez détecté si vous entrez dans son champ.
-Lorsque le bouton a été appuyé, il devient un bouton OFF, et permet d'éteindre la Kinect. Il est à noter que le fait de fermer la fenêtre ou de quitter via le menu éteignent également le capteur de la Kinect, avant de quitter.
-(Plus de détails sur la Kinect : http://fr.wikipedia.org/wiki/Kinect).
-
-Lorsque vous êtes détectés, le squelette de la personne la plus proche s'affiche. Les rectangles sur la droite indiquent la proximité de l'utilisateur par rapport à la Kinect, lorsque l'utilisateur est à moins de 1m, le rectangle du haut est rouge ; entre 1m et 2m, le second est orange ; entre 2m et 3m, le troisième est jaune et au delà de 3m, le dernier rectangle est blanc.
-
-Il existe une zone de détection des mains, située par défaut entre 1m et 1,5m de la Kinect mais configurable. En dehors de cette zone, les mains sont toujours détectées, mais aucun signal n'est envoyé via le serveur TUIO. Il y a deux rectangles en haut de cette fenêtre, permettant d'indiquer si une main est entrée dans ce champ (main gauche/droite dans le champ se traduit par la coloration du rectangle gauche/droit en bleu, et par l'affichage en pixels des coordonnées de la main (sauf pour la profondeur, qui est en mètres).
-
-Il est possible de paramétrer des éléments du Middleware, comme la délimitation du champ pour les mains, le host et le port pour le serveur et l'intervalle de temps minimum qui sépare deux détections de gestes.
-
-Si des erreurs surviennent durant le fonctionnement du Middleware, ceux-ci seront affichés en bas de la fenêtre. Lorsqu'un geste est détecté, une couleur est affichée en bas de la fenêtre, au niveau des exceptions. Pour des raisons de lisibilité au niveau de la détection, la couleur restera affichée tant que la main gauche sera dans le champ. Autrement, la couleur apparaîtra, puis disparaîtra.
-
-A) Position des mains :
-
-Lorsqu'au moins une main entre dans le champ, ses/leurs coordonnées sont envoyées par le serveur au front. Si le front n'est pas lancé, il n'y aura pas d'erreur.
-
-B) Détection de gestes :
-
-Pour l'instant, plusieurs gestes peuvent être détectés :
-
- SWIPE - Désigne un mouvement de claque horizontal, partant de la droite vers la gauche avec la main droite (et inversement pour la gauche). Durant le geste, la main ne doit pas descendre sous la hanche ni aller au dessus de la tête. Il lui faut une certaine longueur de parcours et elle ne doit aller que vers la gauche pour la main droite et vers la droite pour la main gauche. Le swipe peut donc être pour l'instant gauche ou droit.
- Lorsque ce geste est détecté, le bas de la fenêtre se colore en rouge si le swipe est vers la gauche.
- Lorsque ce geste est détecté, le bas de la fenêtre se colore en violet si le swipe est vers la droite.
-
- PUSH/PULL - Mouvement de poussée/traction rectiligne dirigé vers la kinect à partir de l'emplacement actuel de la main effectuant le geste.
- Lorsque ce geste est détecté, le bas de la fenêtre se colore en blanc s'il s'agit d'un push.
- Lorsque ce geste est détecté, le bas de la fenêtre se colore en noir s'il s'agit d'un pull.
-
- En développement :
- JUMP - Action de sauter vers le haut.
-
-IV) Mentions importantes pour le debug :
-
-Il demeure quelques problèmes dans cette version de TraKERS, qui seront réglés à l'occasion d'une autre phase de développement.
-
-1) Instabilité du logiciel lorsqu'un utilisateur se trouve trop proche de la Kinect durant un certain laps de temps (moins d'un mètre).
-2) Le premier client Processing à se connecter au Middleware est le seul à recevoir des messages. Je ne pense pas que cela soit problématique dans la mesure où l'on peut implémenter différentes fonctions de dessins sous processing qui seront appelées suivant les messages reçus par le client.
-
-Si vous expérimentez des difficultés ou souhaitez me soumettre une requête, voici mon adresse : alexandre.bastien@iri.centrepompidou.fr
\ No newline at end of file
--- a/middleware/src/Debug/DebugParameters.xaml Thu Mar 22 16:00:17 2012 +0100
+++ b/middleware/src/Debug/DebugParameters.xaml Thu Mar 22 18:15:53 2012 +0100
@@ -23,7 +23,7 @@
L'intervalle de temps entre le début et la fin du timer pour la détection des gestures.
-->
-<Window x:Class="Trakers.Debug.DebugParameters" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="DebugParameters" Height="380" Width="300">
+<Window x:Class="Trakers.Debug.DebugParameters" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="TraKERS - Paramètres" Height="380" Width="300">
<Grid>
<StackPanel>
<Label Content="Limites du champ de recherche (ex : 1.5 - 2) [1, 4] :" Height="30" HorizontalAlignment="Left" Name="label1" VerticalAlignment="Top" Width="300" />
--- a/middleware/src/Debug/DebugWindow.xaml Thu Mar 22 16:00:17 2012 +0100
+++ b/middleware/src/Debug/DebugWindow.xaml Thu Mar 22 18:15:53 2012 +0100
@@ -21,7 +21,7 @@
des gestures et la distance de l'utilisateur.
-->
-<Window x:Class="Trakers.Debug.DebugWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="DebugWindow" Height="480" Width="640" Closed="Window_Closed" Loaded="Window_Loaded">
+<Window x:Class="Trakers.Debug.DebugWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="TraKERS - DebugWindow" Height="480" Width="640" Closed="Window_Closed" Loaded="Window_Loaded">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
--- a/middleware/src/Trakers.csproj Thu Mar 22 16:00:17 2012 +0100
+++ b/middleware/src/Trakers.csproj Thu Mar 22 18:15:53 2012 +0100
@@ -6,7 +6,7 @@
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{09EF8613-2F1B-4F1D-B6B1-22938EBB529A}</ProjectGuid>
- <OutputType>Exe</OutputType>
+ <OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Trakers</RootNamespace>
<AssemblyName>Trakers</AssemblyName>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/readme - Front Processing.txt Thu Mar 22 18:15:53 2012 +0100
@@ -0,0 +1,88 @@
+TraKERS (Tracking using Kinect and Extracting Robust Skeletons) est une interface basée sur la détection de gestures / positions du squelette envoyé par le SDK Microsoft (1.0) de Kinect.
+
+Auteur : Alexandre BASTIEN.
+
+I) TraKERS - Eléments requis :
+
+Dans cette partie, il vous faudra installer Processing, disponible ici : http://processing.org/download/
+
+II) TraKERS - Structure :
+
+Dans le Front, se trouvent deux principaux exécutables "Trakers" et "Trakers_gestures", respectivement pour le tracé de courbes via les coordonnées des positions des mains récupérées du Middleware et pour l'affichage des gestes détectés. Il aurait été possible de les rassembler en un programme, mais pour des raisons de clarté lors de l'utilisation, j'ai préféré procéder ainsi.
+
+III) TraKERS - Utilisation :
+
+Si le Middleware est lancé, le programme de Front lancé fait office de client, et récupére les notifications envoyées. Détaillons les deux programmes :
+
+A) Trakers (composé du fichier principal et d'un fichier "TuioFunctions" gérant la réception des messages)
+Comme indiqué plus haut, il reçoit et affiche les coordonnées des mains entrant dans le champ délimité par le Middleware.
+Afin d'indiquer les limites de zone de dessin, un masque noir a été appliqué, et se met à jour.
+Les notifications du client s'affichent en blanc en haut du masque, et indique si une ou deux mains sont détectées.
+Lorsque l'on dessine, une série d'ellipses apparaissent à l'écran, formant des courbes.
+Lorsque deux mains sont détectées, la gauche est rouge et l'autre verte.
+Si une main et une seule est détectée, la courbe sera rouge.
+Si la ou les mains s'approchent et atteignent une certaine proximité, le segment dessiné deviendra bleu à partir de ce moment-là .
+
+B) Trakers_gestures (composé du fichier principal et d'un fichier "TuioFunctions" gérant la réception des messages)
+Le même masque a été appliqué dans ce programme d'affichage de notifications de gestes indiqués par le Middleware.
+Le programme indique simplement dans la partie supérieure du masque s'il détecte ou non une gesture, et s'il en détecte une, donne le code envoyé par le Middleware.
+
+Il existe d'autres exemples au sein de cet installeur, qui seront abordés au sein du tutoriel présent dans le dossier : front_processing/doc.
+
+IV) Fonctionnement :
+
+Les programmes sont découpés en fonctions, afin de rendre leur structure plus cohérente.
+
+Il existe deux fonctions principales sous Processing.
+void setup(), qui permet d'initialiser des variables, la taille de la fenêtre, etc.
+void draw(), qui est raffraichie constamment et sert principalement à dessiner ou faire appel aux fonctions amenées à être appelées toutes les N ms.
+Il est bien entendu possible de dessiner via des fonctions déjà implémentées et prêtes à l'emploi, dont la documentation se trouve ici :
+
+http://processing.org/reference/
+
+Ils reçoivent des messages OSC de la part du Middleware. Ceux-ci sont contenus dans des objets qui sont des TuioCursors (en 3D) pour gérer la position des mains et des TuioStrings (objets personnalisés, ajoutés aux dll client et serveur TUIO).
+
+Dans les programmes, les curseurs 3D sont principalement utilisés pour transmettre les coordonnées X, Y et Z (X et Y étant des pixels, et Z une distance en mètres). Les strings, quant à eux, ne véhiculent que de simples messages textuels.
+
+Ils sont envoyés par des listes présentes dans le client TUIO.
+
+Voici un bout de code expliquant comment obtenir la position des mains :
+
+TuioProcessing tuioClient;
+tuioClient = new TuioProcessing(host, port; //host pourrait être this par défaut et port le numéro du port au format int.
+//On récupère les curseurs.
+Vector tuioCursorList = tuioClient.getTuioCursors();
+//Si aucune main n'est repérée.
+if(tuioCursorList.size() <= 0)
+{
+ //fonction_1();
+}
+//Si une main est repéré
+else if (tuioCursorList.size() == 1)
+{
+ TuioCursor cursor = (TuioCursor)tuioCursorList.elementAt(0);
+ //fonctionAffiche1Main(cursor);
+ //s'il y en a un deuxième, on l'obtient à elementAt(1)
+}
+//Si c'est les 2.
+else if(tuioCursorList.size() == 2)
+{
+ //fonctionAffiche2Mains(tuioCursorList);
+}
+
+Voici à présent comment extraire la position actuelle d'une main, via un tuioCursor :
+
+//On obtient le point actuel du curseur TUIO.
+TuioPoint pt = cursor.getPosition();
+//On affiche les coordonnées dans la fenêtre à la position (100 ; 20).
+text(pt.getX() + " " + pt.getY() + " " + pt.getZ(), 100, 20);
+
+Il est à noter que plusieurs projets existent sous Processing, notamment dans l'affichage de fluides ou de fumée par exemple :
+
+http://processing.org/discourse/yabb/YaBB.cgi?board=Contribution_Simlation;action=display;num=1045166270
+http://bodytag.org/nav.php?u=fluid3/
+http://bodytag.org/fluid3/fluid3.pde
+http://bodytag.org/nav.php?u=smoke2/
+http://bodytag.org/smoke2/smoke2.pde
+
+Si vous expérimentez des difficultés ou souhaitez me soumettre une requête, voici mon adresse : alexandre.bastien@iri.centrepompidou.fr
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/readme - Middleware.txt Thu Mar 22 18:15:53 2012 +0100
@@ -0,0 +1,75 @@
+TraKERS (Tracking using Kinect and Extracting Robust Skeletons) est une interface basée sur la détection de gestures / positions du squelette envoyé par le SDK Microsoft (1.0) de Kinect.
+
+Auteur : Alexandre BASTIEN.
+
+I) TraKERS - Eléments requis :
+
+Les spécifications de Microsoft font état des éléments matériels et logiciels requis afin de pouvoir utiliser le SDK :
+
+Besoins matériels :
+ Capteur Kinect.
+ Processeur32-bit (x86) ou 64-bit (x64).
+ Dual-core 2.66-GHz ou plus rapide.
+ Bus USB 2.0 dédié.
+ 2 GB RAM.
+Besoins logiciels :
+ Microsoft® Visual Studio® 2010 Express ou une autre édition de Visual Studio 2010 (si vous souhaitez développer).
+ Windows 7.
+ NET Framework 4.0.
+
+Vous les trouverez ici si vous le souhaitez : http://www.microsoft.com/en-us/kinectforwindows/develop/release-notes.aspx
+
+La version 4.0 du Framework est présente dans l'installation de TraKERS.
+Néanmoins, par soucis de taille de l'installeur, il vous sera nécessaire d'installer le SDK 1.0 de Microsoft ici :
+http://www.microsoft.com/en-us/kinectforwindows/develop/overview.aspx
+
+II) TraKERS - Structure :
+
+TraKERS v1.0 est composé de deux modules, le Middleware (utilisant la Kinect afin de détecter des gestes et de suivre la position des mains et le Front (développé en Processing), permettant de récupérer les messages OSC du Middleware. Pour plus d'informations sur le Front, veuillez consulter la documentation située dans le dossier Front Processing.
+
+Afin de permettre au Middleware d'envoyer des messages au Front, un client TUIO a été installé dans le Front et un serveur TUIO dans le Middleware.
+
+Le middleware dispose d'une interface de debug permettant de connaître en temps réel la position de l'utilisateur à la Kinect. Ces fonctionnalités seront vues plus avant dans la partie Utilisation.
+
+Les sources des modules sont fournies lors de l'installation, n'hésitez pas à les consulter si besoin est.
+
+III) TraKERS - Utilisation :
+
+Vous pouvez démarrer le Middleware ou bien le Front dans l'ordre que vous voulez.
+Lorsque le Middleware est démarré, la Kinect ne s'allume pas encore. Il faut pour cela appuyer sur le bouton ON en bas de la fenêtre de debug. Le capteur (situé le plus à gauche sur la Kinect) va alors s'allumer en rouge, signe que vous serez détecté si vous entrez dans son champ.
+Lorsque le bouton a été appuyé, il devient un bouton OFF, et permet d'éteindre la Kinect. Il est à noter que le fait de fermer la fenêtre ou de quitter via le menu éteignent également le capteur de la Kinect, avant de quitter.
+(Plus de détails sur la Kinect : http://fr.wikipedia.org/wiki/Kinect).
+
+Lorsque vous êtes détectés, le squelette de la personne la plus proche s'affiche. Les rectangles sur la droite indiquent la proximité de l'utilisateur par rapport à la Kinect, lorsque l'utilisateur est à moins de 1m, le rectangle du haut est rouge ; entre 1m et 2m, le second est orange ; entre 2m et 3m, le troisième est jaune et au delà de 3m, le dernier rectangle est blanc.
+
+Il existe une zone de détection des mains, située par défaut entre 1m et 1,5m de la Kinect mais configurable. En dehors de cette zone, les mains sont toujours détectées, mais aucun signal n'est envoyé via le serveur TUIO. Il y a deux rectangles en haut de cette fenêtre, permettant d'indiquer si une main est entrée dans ce champ (main gauche/droite dans le champ se traduit par la coloration du rectangle gauche/droit en bleu, et par l'affichage en pixels des coordonnées de la main (sauf pour la profondeur, qui est en mètres).
+
+Il est possible de paramétrer des éléments du Middleware, comme la délimitation du champ pour les mains, le host et le port pour le serveur et l'intervalle de temps minimum qui sépare deux détections de gestes.
+
+Si des erreurs surviennent durant le fonctionnement du Middleware, ceux-ci seront affichés en bas de la fenêtre. Lorsqu'un geste est détecté, une couleur est affichée en bas de la fenêtre, au niveau des exceptions. Pour des raisons de lisibilité au niveau de la détection, la couleur restera affichée tant que la main gauche sera dans le champ. Autrement, la couleur apparaîtra, puis disparaîtra.
+
+A) Position des mains :
+
+Lorsqu'au moins une main entre dans le champ, ses/leurs coordonnées sont envoyées par le serveur au front. Si le front n'est pas lancé, il n'y aura pas d'erreur.
+
+B) Détection de gestes :
+
+Pour l'instant, plusieurs gestes peuvent être détectés :
+
+ SWIPE - Désigne un mouvement de claque horizontal, partant de la droite vers la gauche avec la main droite (et inversement pour la gauche). Durant le geste, la main ne doit pas descendre sous la hanche ni aller au dessus de la tête. Il lui faut une certaine longueur de parcours et elle ne doit aller que vers la gauche pour la main droite et vers la droite pour la main gauche. Le swipe peut donc être pour l'instant gauche ou droit.
+ Lorsque ce geste est détecté, le bas de la fenêtre se colore en rouge si le swipe est vers la gauche.
+ Lorsque ce geste est détecté, le bas de la fenêtre se colore en violet si le swipe est vers la droite.
+
+ PUSH/PULL - Mouvement de poussée/traction rectiligne dirigé vers la kinect à partir de l'emplacement actuel de la main effectuant le geste.
+ Lorsque ce geste est détecté, le bas de la fenêtre se colore en blanc s'il s'agit d'un push.
+ Lorsque ce geste est détecté, le bas de la fenêtre se colore en noir s'il s'agit d'un pull.
+
+ En développement :
+ JUMP - Action de sauter vers le haut.
+
+IV) Mention(s) importante(s) pour le debug :
+
+Il semblerait que l'implémentation actuelle de TUIO dans ce projet ne gère pas le multi-client.
+Par conséquent, le premier client Processing à se connecter au Middleware est le seul à recevoir des messages.
+
+Si vous expérimentez des difficultés ou souhaitez me soumettre une requête, voici mon adresse : alexandre.bastien@iri.centrepompidou.fr
\ No newline at end of file