t1 / TFDContents / Assets / Standard Assets / Windows / Kinect / JointOrientation.cs @ 9
이력 | 보기 | 이력해설 | 다운로드 (1.3 KB)
1 |
#if !(UNITY_WSA_10_0 && NETFX_CORE) |
---|---|
2 |
using RootSystem = System; |
3 |
using System.Linq; |
4 |
using System.Collections.Generic; |
5 |
namespace Windows.Kinect |
6 |
{ |
7 |
// |
8 |
// Windows.Kinect.JointOrientation |
9 |
// |
10 |
[RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] |
11 |
public struct JointOrientation |
12 |
{ |
13 |
public Windows.Kinect.JointType JointType { get; set; } |
14 |
public Windows.Kinect.Vector4 Orientation { get; set; } |
15 |
|
16 |
public override int GetHashCode() |
17 |
{ |
18 |
return JointType.GetHashCode() ^ Orientation.GetHashCode(); |
19 |
} |
20 |
|
21 |
public override bool Equals(object obj) |
22 |
{ |
23 |
if (!(obj is JointOrientation)) |
24 |
{ |
25 |
return false; |
26 |
} |
27 |
|
28 |
return this.Equals((JointOrientation)obj); |
29 |
} |
30 |
|
31 |
public bool Equals(JointOrientation obj) |
32 |
{ |
33 |
return JointType.Equals(obj.JointType) && Orientation.Equals(obj.Orientation); |
34 |
} |
35 |
|
36 |
public static bool operator ==(JointOrientation a, JointOrientation b) |
37 |
{ |
38 |
return a.Equals(b); |
39 |
} |
40 |
|
41 |
public static bool operator !=(JointOrientation a, JointOrientation b) |
42 |
{ |
43 |
return !(a.Equals(b)); |
44 |
} |
45 |
} |
46 |
|
47 |
} |
48 |
#endif |