1 | // -----------------------------------------------------------------------
|
---|
2 | // <copyright file="InteractionStreamHitTestInfo.cs" company="Microsoft">
|
---|
3 | // Copyright (c) Microsoft Corporation. All rights reserved.
|
---|
4 | // </copyright>
|
---|
5 | // -----------------------------------------------------------------------
|
---|
6 |
|
---|
7 | namespace Microsoft.Samples.Kinect.Webserver.Sensor.Serialization
|
---|
8 | {
|
---|
9 | using System.Diagnostics.CodeAnalysis;
|
---|
10 |
|
---|
11 | using Microsoft.Kinect.Toolkit.Interaction;
|
---|
12 |
|
---|
13 | /// <summary>
|
---|
14 | /// Represents interaction information available for a specified location in UI.
|
---|
15 | /// </summary>
|
---|
16 | /// <remarks>
|
---|
17 | /// This class is equivalent to <see cref="InteractionInfo"/>, but meant for serializing
|
---|
18 | /// from JSON responses from a web client.
|
---|
19 | /// </remarks>
|
---|
20 | [SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:ElementMustBeginWithUpperCaseLetter", Justification = "Lower case names allowed for JSON serialization.")]
|
---|
21 | internal class InteractionStreamHitTestInfo
|
---|
22 | {
|
---|
23 | /// <summary>
|
---|
24 | /// True if interaction target can respond to press actions.
|
---|
25 | /// </summary>
|
---|
26 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "is", Justification = "Lower case names allowed for JSON serialization.")]
|
---|
27 | public bool isPressTarget { get; set; }
|
---|
28 |
|
---|
29 | /// <summary>
|
---|
30 | /// Identifier for control that corresponds to UI location of interest.
|
---|
31 | /// </summary>
|
---|
32 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "press", Justification = "Lower case names allowed for JSON serialization.")]
|
---|
33 | public string pressTargetControlId { get; set; }
|
---|
34 |
|
---|
35 | /// <summary>
|
---|
36 | /// X-coordinate of point towards which user's hand pointer should be
|
---|
37 | /// attracted as the user's hand performs a press action.
|
---|
38 | /// </summary>
|
---|
39 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "press", Justification = "Lower case names allowed for JSON serialization.")]
|
---|
40 | public double pressAttractionPointX { get; set; }
|
---|
41 |
|
---|
42 | /// <summary>
|
---|
43 | /// Y-coordinate of point towards which user's hand pointer should be
|
---|
44 | /// attracted as the user's hand performs a press action.
|
---|
45 | /// </summary>
|
---|
46 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "press", Justification = "Lower case names allowed for JSON serialization.")]
|
---|
47 | public double pressAttractionPointY { get; set; }
|
---|
48 |
|
---|
49 | /// <summary>
|
---|
50 | /// True if interaction target can respond to grip/release actions.
|
---|
51 | /// </summary>
|
---|
52 | [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "is", Justification = "Lower case names allowed for JSON serialization.")]
|
---|
53 | public bool isGripTarget { get; set; }
|
---|
54 | }
|
---|
55 | }
|
---|