t1 / TFDContents / Assets / Standard Assets / Windows / Kinect / Joint.cs @ 11
이력 | 보기 | 이력해설 | 다운로드 (1.34 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.Joint |
| 9 |
// |
| 10 |
[RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)] |
| 11 |
public struct Joint |
| 12 |
{
|
| 13 |
public Windows.Kinect.JointType JointType { get; set; }
|
| 14 |
public Windows.Kinect.CameraSpacePoint Position { get; set; }
|
| 15 |
public Windows.Kinect.TrackingState TrackingState { get; set; }
|
| 16 |
|
| 17 |
public override int GetHashCode() |
| 18 |
{
|
| 19 |
return JointType.GetHashCode() ^ Position.GetHashCode() ^ TrackingState.GetHashCode(); |
| 20 |
} |
| 21 |
|
| 22 |
public override bool Equals(object obj) |
| 23 |
{
|
| 24 |
if (!(obj is Joint)) |
| 25 |
{
|
| 26 |
return false; |
| 27 |
} |
| 28 |
|
| 29 |
return this.Equals((Joint)obj); |
| 30 |
} |
| 31 |
|
| 32 |
public bool Equals(Joint obj) |
| 33 |
{
|
| 34 |
return JointType.Equals(obj.JointType) && Position.Equals(obj.Position) && TrackingState.Equals(obj.TrackingState); |
| 35 |
} |
| 36 |
|
| 37 |
public static bool operator ==(Joint a, Joint b) |
| 38 |
{
|
| 39 |
return a.Equals(b); |
| 40 |
} |
| 41 |
|
| 42 |
public static bool operator !=(Joint a, Joint b) |
| 43 |
{
|
| 44 |
return !(a.Equals(b)); |
| 45 |
} |
| 46 |
} |
| 47 |
|
| 48 |
} |
| 49 |
#endif |