source: other-projects/playing-in-the-street/summer-2013/trunk/Microsoft.Samples.Kinect.Webserver/Sensor/IUserStateManager.cs@ 28896

Last change on this file since 28896 was 28896, checked in by davidb, 10 years ago

Core Web Server that connects to the Kinect device

File size: 2.6 KB
Line 
1// -----------------------------------------------------------------------
2// <copyright file="IUserStateManager.cs" company="Microsoft">
3// Copyright (c) Microsoft Corporation. All rights reserved.
4// </copyright>
5// -----------------------------------------------------------------------
6
7namespace Microsoft.Samples.Kinect.Webserver.Sensor
8{
9 using System;
10 using System.Collections.Generic;
11
12 using Microsoft.Kinect;
13 using Microsoft.Kinect.Toolkit.Interaction;
14
15 /// <summary>
16 /// Interface for objects that keep track of state of users associated with a specific
17 /// Kinect sensor.
18 /// </summary>
19 public interface IUserStateManager
20 {
21 /// <summary>
22 /// Event triggered whenever user state changes.
23 /// </summary>
24 event EventHandler<UserStateChangedEventArgs> UserStateChanged;
25
26 /// <summary>
27 /// Dictionary mapping user tracking Ids to names used for states corresponding to
28 /// those users.
29 /// </summary>
30 IDictionary<int, string> UserStates { get; }
31
32 /// <summary>
33 /// Tracking id of primary user associated with UI interactions.
34 /// </summary>
35 int PrimaryUserTrackingId { get; }
36
37 /// <summary>
38 /// Determines which users should be tracked in the future, based on selection
39 /// metrics and engagement state.
40 /// </summary>
41 /// <param name="frameSkeletons">
42 /// Array of skeletons from which the appropriate user tracking Ids will be selected.
43 /// </param>
44 /// <param name="timestamp">
45 /// Timestamp from skeleton frame.
46 /// </param>
47 /// <param name="chosenTrackingIds">
48 /// Array that will contain the tracking Ids of users to track, sorted from most
49 /// important to least important user to track.
50 /// </param>
51 void ChooseTrackedUsers(Skeleton[] frameSkeletons, long timestamp, int[] chosenTrackingIds);
52
53 /// <summary>
54 /// Called whenever the set of tracked users has changed.
55 /// </summary>
56 /// <param name="trackedUserInfo">
57 /// User information from which we'll update the set of tracked users and the primary user.
58 /// </param>
59 /// <param name="timestamp">
60 /// Interaction frame timestamp corresponding to given user information.
61 /// </param>
62 void UpdateUserInformation(IEnumerable<UserInfo> trackedUserInfo, long timestamp);
63
64 /// <summary>
65 /// Clear out all user state and start from scratch.
66 /// </summary>
67 void Reset();
68 }
69}
Note: See TracBrowser for help on using the repository browser.