equal
deleted
inserted
replaced
1 /* |
|
2 * This file is part of the TraKERS\Middleware package. |
|
3 * |
|
4 * (c) IRI <http://www.iri.centrepompidou.fr/> |
|
5 * |
|
6 * For the full copyright and license information, please view the LICENSE_MIDDLEWARE |
|
7 * file that was distributed with this source code. |
|
8 */ |
|
9 |
|
10 /* |
|
11 * Projet : TraKERS |
|
12 * Module : MIDDLEWARE |
|
13 * Sous-Module : Tracking/Events |
|
14 * Classe : UserPositionListener |
|
15 * |
|
16 * Auteur : alexandre.bastien@iri.centrepompidou.fr |
|
17 * |
|
18 * Fonctionnalités : Ce listener écoute l'événement du type : L'utilisateur s'est déplacé dans la zone de |
|
19 * détection. |
|
20 * Il contient le code a être éxecuté au cas où cet événement survient, à savoir : |
|
21 * - On affiche un visuel dans le debug. |
|
22 * - On notifie le serveur TUIO. |
|
23 */ |
|
24 |
|
25 using System; |
|
26 using System.Collections.Generic; |
|
27 using System.Linq; |
|
28 using System.Text; |
|
29 |
|
30 namespace Trakers.Tracking.Events |
|
31 { |
|
32 public class UserPositionListener |
|
33 { |
|
34 /* |
|
35 * Méthode appelée lorsque on a l'événement : L'utilisateur s'est déplacé dans la zone de détection. |
|
36 */ |
|
37 public void ShowOnScreen(object o, UserPositionEventArgs e) |
|
38 { |
|
39 //On l'indique dans le debug. |
|
40 e.debug.showDistance(e.distance); |
|
41 //On notifie le serveur TUIO. |
|
42 if(e.distance > 10f && e.distance < 100f) |
|
43 e.server.ModeNotification("MOSSHOW-" + e.imagesToShow); |
|
44 } |
|
45 } |
|
46 } |
|