middleware/src/MainModule/Events/RightHandTrackedListener.cs
changeset 15 4b78f179e7ce
child 27 6c08d4d7219e
equal deleted inserted replaced
14:10d5199d9874 15:4b78f179e7ce
       
     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 : MainModule/Events
       
    14  * Classe : RightHandTrackedListener
       
    15  * 
       
    16  * Auteur : alexandre.bastien@iri.centrepompidou.fr
       
    17  * 
       
    18  * Fonctionnalités : Ce listener écoute l'événement du type : La main droite est entrée dans le champ.
       
    19  * Il contient le code a être éxecuté au cas où cet événement survient, à savoir :
       
    20  * - On affiche un visuel dans le debug.
       
    21  * - On notifie le serveur TUIO.
       
    22  */
       
    23 
       
    24 using System;
       
    25 using System.Collections.Generic;
       
    26 using System.Linq;
       
    27 using System.Text;
       
    28 using Microsoft.Kinect;
       
    29 using System.Windows.Media.Media3D;
       
    30 
       
    31 namespace Trakers.MainModule.Events
       
    32 {
       
    33     public class RightHandTrackedListener
       
    34     {
       
    35         /*
       
    36         * Méthode appelée lorsque on a l'événement : La main droite est entrée dans le champ.
       
    37         */
       
    38         public void showAndSend(object o, RightHandTrackedEventArgs e)
       
    39         {
       
    40             e.debug.showRightHandRect(true);
       
    41             Point3D pt = new Point3D(e.handJoint.Position.X, e.handJoint.Position.Y, e.handJoint.Position.Z);
       
    42             e.server.RightHandTracked(pt);
       
    43         }
       
    44     }
       
    45 }