| 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.BodyFrameArrivedEventArgs
|
| 9 |
|
|
//
|
| 10 |
|
|
public sealed partial class BodyFrameArrivedEventArgs : RootSystem.EventArgs, 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 BodyFrameArrivedEventArgs(RootSystem.IntPtr pNative)
|
| 18 |
|
|
{
|
| 19 |
|
|
_pNative = pNative;
|
| 20 |
|
|
Windows_Kinect_BodyFrameArrivedEventArgs_AddRefObject(ref _pNative);
|
| 21 |
|
|
}
|
| 22 |
|
|
|
| 23 |
|
|
~BodyFrameArrivedEventArgs()
|
| 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_BodyFrameArrivedEventArgs_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_BodyFrameArrivedEventArgs_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<BodyFrameArrivedEventArgs>(_pNative);
|
| 42 |
|
|
Windows_Kinect_BodyFrameArrivedEventArgs_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_BodyFrameArrivedEventArgs_get_FrameReference(RootSystem.IntPtr pNative);
|
| 51 |
|
|
public Windows.Kinect.BodyFrameReference FrameReference
|
| 52 |
|
|
{
|
| 53 |
|
|
get
|
| 54 |
|
|
{
|
| 55 |
|
|
if (_pNative == RootSystem.IntPtr.Zero)
|
| 56 |
|
|
{
|
| 57 |
|
|
throw new RootSystem.ObjectDisposedException("BodyFrameArrivedEventArgs");
|
| 58 |
|
|
}
|
| 59 |
|
|
|
| 60 |
|
|
RootSystem.IntPtr objectPointer = Windows_Kinect_BodyFrameArrivedEventArgs_get_FrameReference(_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 |
|
|
private void __EventCleanup()
|
| 72 |
|
|
{
|
| 73 |
|
|
}
|
| 74 |
|
|
}
|
| 75 |
|
|
|
| 76 |
|
|
}
|
| 77 |
|
|
#endif |