|
17
|
1 |
/* |
|
|
2 |
* This file is part of the TraKERS\Middleware package. |
|
|
3 |
* |
|
|
4 |
* (c) IRI <http://www.iri.centrepompidou.fr/> |
|
|
5 |
* |
|
27
|
6 |
* For the full copyright and license information, please view the LICENSE |
|
17
|
7 |
* file that was distributed with this source code. |
|
|
8 |
*/ |
|
|
9 |
|
|
|
10 |
/* |
|
|
11 |
* Projet : TraKERS |
|
|
12 |
* Module : MIDDLEWARE |
|
|
13 |
* Sous-Module : Tracking/Postures |
|
|
14 |
* Classe : PostureDetector |
|
|
15 |
* |
|
|
16 |
* Auteur : alexandre.bastien@iri.centrepompidou.fr |
|
|
17 |
* |
|
|
18 |
* Fonctionnalités : Reçoit la position des noeuds les plus récents envoyés par la classe de manipulation de la Kinect. |
|
|
19 |
*/ |
|
|
20 |
|
|
|
21 |
using System; |
|
|
22 |
using System.Collections.Generic; |
|
|
23 |
using System.Linq; |
|
|
24 |
using System.Text; |
|
|
25 |
using Trakers.Debug; |
|
|
26 |
using Microsoft.Kinect; |
|
|
27 |
|
|
|
28 |
namespace Trakers.Tracking.Postures |
|
|
29 |
{ |
|
|
30 |
public class PostureDetector |
|
|
31 |
{ |
|
|
32 |
public DebugWindow debug; |
|
|
33 |
|
|
|
34 |
//Liste des positions du squelette. |
|
|
35 |
protected static List<Joint> currentState = new List<Joint>(); |
|
|
36 |
|
|
|
37 |
//Distance de référence. |
|
|
38 |
protected float refDistance; |
|
|
39 |
|
|
|
40 |
public PostureDetector(DebugWindow _debug) |
|
|
41 |
{ |
|
|
42 |
debug = _debug; |
|
|
43 |
} |
|
|
44 |
|
|
|
45 |
//Stocke les positions les plus récentes du squelette. |
|
|
46 |
public static void UpdateSkeletonState(List<Joint> latestSkeleton) |
|
|
47 |
{ |
|
|
48 |
currentState = latestSkeleton; |
|
|
49 |
} |
|
|
50 |
} |
|
|
51 |
} |