프로젝트

일반

사용자정보

통계
| 개정판:

t1 / TFDContents / Assets / Standard Assets / Windows / Kinect / DepthSpacePoint.cs @ 9

이력 | 보기 | 이력해설 | 다운로드 (1.19 KB)

1 3 KTH
#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.DepthSpacePoint
9
    //
10
    [RootSystem.Runtime.InteropServices.StructLayout(RootSystem.Runtime.InteropServices.LayoutKind.Sequential)]
11
    public struct DepthSpacePoint
12
    {
13
        public float X { get; set; }
14
        public float Y { get; set; }
15
16
        public override int GetHashCode()
17
        {
18
            return X.GetHashCode() ^ Y.GetHashCode();
19
        }
20
21
        public override bool Equals(object obj)
22
        {
23
            if (!(obj is DepthSpacePoint))
24
            {
25
                return false;
26
            }
27
28
            return this.Equals((DepthSpacePoint)obj);
29
        }
30
31
        public bool Equals(DepthSpacePoint obj)
32
        {
33
            return X.Equals(obj.X) && Y.Equals(obj.Y);
34
        }
35
36
        public static bool operator ==(DepthSpacePoint a, DepthSpacePoint b)
37
        {
38
            return a.Equals(b);
39
        }
40
41
        public static bool operator !=(DepthSpacePoint a, DepthSpacePoint b)
42
        {
43
            return !(a.Equals(b));
44
        }
45
    }
46
47
}
48
#endif