프로젝트

일반

사용자정보

통계
| 개정판:

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

이력 | 보기 | 이력해설 | 다운로드 (8.47 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.MultiSourceFrame
9
    //
10
    public sealed partial class MultiSourceFrame : Helper.INativeWrapper
11
12
    {
13
        internal RootSystem.IntPtr _pNative;
14
        RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } }
15
16
        // Constructors and Finalizers
17
        internal MultiSourceFrame(RootSystem.IntPtr pNative)
18
        {
19
            _pNative = pNative;
20
            Windows_Kinect_MultiSourceFrame_AddRefObject(ref _pNative);
21
        }
22
23
        ~MultiSourceFrame()
24
        {
25
            Dispose(false);
26
        }
27
28
        [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
29
        private static extern void Windows_Kinect_MultiSourceFrame_ReleaseObject(ref RootSystem.IntPtr pNative);
30
        [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
31
        private static extern void Windows_Kinect_MultiSourceFrame_AddRefObject(ref RootSystem.IntPtr pNative);
32
        private void Dispose(bool disposing)
33
        {
34
            if (_pNative == RootSystem.IntPtr.Zero)
35
            {
36
                return;
37
            }
38
39
            __EventCleanup();
40
41
            Helper.NativeObjectCache.RemoveObject<MultiSourceFrame>(_pNative);
42
                Windows_Kinect_MultiSourceFrame_ReleaseObject(ref _pNative);
43
44
            _pNative = RootSystem.IntPtr.Zero;
45
        }
46
47
48
        // Public Properties
49
        [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
50
        private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_BodyFrameReference(RootSystem.IntPtr pNative);
51
        public  Windows.Kinect.BodyFrameReference BodyFrameReference
52
        {
53
            get
54
            {
55
                if (_pNative == RootSystem.IntPtr.Zero)
56
                {
57
                    throw new RootSystem.ObjectDisposedException("MultiSourceFrame");
58
                }
59
60
                RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_BodyFrameReference(_pNative);
61
                Helper.ExceptionHelper.CheckLastError();
62
                if (objectPointer == RootSystem.IntPtr.Zero)
63
                {
64
                    return null;
65
                }
66
67
                return Helper.NativeObjectCache.CreateOrGetObject<Windows.Kinect.BodyFrameReference>(objectPointer, n => new Windows.Kinect.BodyFrameReference(n));
68
            }
69
        }
70
71
        [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
72
        private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_BodyIndexFrameReference(RootSystem.IntPtr pNative);
73
        public  Windows.Kinect.BodyIndexFrameReference BodyIndexFrameReference
74
        {
75
            get
76
            {
77
                if (_pNative == RootSystem.IntPtr.Zero)
78
                {
79
                    throw new RootSystem.ObjectDisposedException("MultiSourceFrame");
80
                }
81
82
                RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_BodyIndexFrameReference(_pNative);
83
                Helper.ExceptionHelper.CheckLastError();
84
                if (objectPointer == RootSystem.IntPtr.Zero)
85
                {
86
                    return null;
87
                }
88
89
                return Helper.NativeObjectCache.CreateOrGetObject<Windows.Kinect.BodyIndexFrameReference>(objectPointer, n => new Windows.Kinect.BodyIndexFrameReference(n));
90
            }
91
        }
92
93
        [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
94
        private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_ColorFrameReference(RootSystem.IntPtr pNative);
95
        public  Windows.Kinect.ColorFrameReference ColorFrameReference
96
        {
97
            get
98
            {
99
                if (_pNative == RootSystem.IntPtr.Zero)
100
                {
101
                    throw new RootSystem.ObjectDisposedException("MultiSourceFrame");
102
                }
103
104
                RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_ColorFrameReference(_pNative);
105
                Helper.ExceptionHelper.CheckLastError();
106
                if (objectPointer == RootSystem.IntPtr.Zero)
107
                {
108
                    return null;
109
                }
110
111
                return Helper.NativeObjectCache.CreateOrGetObject<Windows.Kinect.ColorFrameReference>(objectPointer, n => new Windows.Kinect.ColorFrameReference(n));
112
            }
113
        }
114
115
        [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
116
        private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_DepthFrameReference(RootSystem.IntPtr pNative);
117
        public  Windows.Kinect.DepthFrameReference DepthFrameReference
118
        {
119
            get
120
            {
121
                if (_pNative == RootSystem.IntPtr.Zero)
122
                {
123
                    throw new RootSystem.ObjectDisposedException("MultiSourceFrame");
124
                }
125
126
                RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_DepthFrameReference(_pNative);
127
                Helper.ExceptionHelper.CheckLastError();
128
                if (objectPointer == RootSystem.IntPtr.Zero)
129
                {
130
                    return null;
131
                }
132
133
                return Helper.NativeObjectCache.CreateOrGetObject<Windows.Kinect.DepthFrameReference>(objectPointer, n => new Windows.Kinect.DepthFrameReference(n));
134
            }
135
        }
136
137
        [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
138
        private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_InfraredFrameReference(RootSystem.IntPtr pNative);
139
        public  Windows.Kinect.InfraredFrameReference InfraredFrameReference
140
        {
141
            get
142
            {
143
                if (_pNative == RootSystem.IntPtr.Zero)
144
                {
145
                    throw new RootSystem.ObjectDisposedException("MultiSourceFrame");
146
                }
147
148
                RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_InfraredFrameReference(_pNative);
149
                Helper.ExceptionHelper.CheckLastError();
150
                if (objectPointer == RootSystem.IntPtr.Zero)
151
                {
152
                    return null;
153
                }
154
155
                return Helper.NativeObjectCache.CreateOrGetObject<Windows.Kinect.InfraredFrameReference>(objectPointer, n => new Windows.Kinect.InfraredFrameReference(n));
156
            }
157
        }
158
159
        [RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
160
        private static extern RootSystem.IntPtr Windows_Kinect_MultiSourceFrame_get_LongExposureInfraredFrameReference(RootSystem.IntPtr pNative);
161
        public  Windows.Kinect.LongExposureInfraredFrameReference LongExposureInfraredFrameReference
162
        {
163
            get
164
            {
165
                if (_pNative == RootSystem.IntPtr.Zero)
166
                {
167
                    throw new RootSystem.ObjectDisposedException("MultiSourceFrame");
168
                }
169
170
                RootSystem.IntPtr objectPointer = Windows_Kinect_MultiSourceFrame_get_LongExposureInfraredFrameReference(_pNative);
171
                Helper.ExceptionHelper.CheckLastError();
172
                if (objectPointer == RootSystem.IntPtr.Zero)
173
                {
174
                    return null;
175
                }
176
177
                return Helper.NativeObjectCache.CreateOrGetObject<Windows.Kinect.LongExposureInfraredFrameReference>(objectPointer, n => new Windows.Kinect.LongExposureInfraredFrameReference(n));
178
            }
179
        }
180
181
182
        // Public Methods
183
        private void __EventCleanup()
184
        {
185
        }
186
    }
187
188
}
189
#endif