using RootSystem = System;
using System.Linq;
using System.Collections.Generic;
namespace Windows.Kinect
{
//
// Windows.Kinect.Body
//
public sealed partial class Body : Helper.INativeWrapper
{
internal RootSystem.IntPtr _pNative;
RootSystem.IntPtr Helper.INativeWrapper.nativePtr { get { return _pNative; } }
// Constructors and Finalizers
internal Body(RootSystem.IntPtr pNative)
{
_pNative = pNative;
Windows_Kinect_Body_AddRefObject(ref _pNative);
}
~Body()
{
Dispose(false);
}
[RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
private static extern void Windows_Kinect_Body_ReleaseObject(ref RootSystem.IntPtr pNative);
[RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
private static extern void Windows_Kinect_Body_AddRefObject(ref RootSystem.IntPtr pNative);
private void Dispose(bool disposing)
{
if (_pNative == RootSystem.IntPtr.Zero)
{
return;
}
__EventCleanup();
Helper.NativeObjectCache.RemoveObject
(_pNative);
Windows_Kinect_Body_ReleaseObject(ref _pNative);
_pNative = RootSystem.IntPtr.Zero;
}
// Public Properties
[RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
private static extern int Windows_Kinect_Body_get_Activities(RootSystem.IntPtr pNative, [RootSystem.Runtime.InteropServices.Out] Windows.Kinect.Activity[] outKeys, [RootSystem.Runtime.InteropServices.Out] Windows.Kinect.DetectionResult[] outValues, int outCollectionSize);
[RootSystem.Runtime.InteropServices.DllImport("KinectUnityAddin", CallingConvention=RootSystem.Runtime.InteropServices.CallingConvention.Cdecl, SetLastError=true)]
private static extern int Windows_Kinect_Body_get_Activities_Length(RootSystem.IntPtr pNative);
public RootSystem.Collections.Generic.Dictionary Activities
{
get
{
if (_pNative == RootSystem.IntPtr.Zero)
{
throw new RootSystem.ObjectDisposedException("Body");
}
int outCollectionSize = Windows_Kinect_Body_get_Activities_Length(_pNative);
var outKeys = new Windows.Kinect.Activity[outCollectionSize];
var outValues = new Windows.Kinect.DetectionResult[outCollectionSize];
var managedDictionary = new RootSystem.Collections.Generic.Dictionary();
outCollectionSize = Windows_Kinect_Body_get_Activities(_pNative, outKeys, outValues, outCollectionSize);
Helper.ExceptionHelper.CheckLastError();
for(int i=0;i Appearance
{
get
{
if (_pNative == RootSystem.IntPtr.Zero)
{
throw new RootSystem.ObjectDisposedException("Body");
}
int outCollectionSize = Windows_Kinect_Body_get_Appearance_Length(_pNative);
var outKeys = new Windows.Kinect.Appearance[outCollectionSize];
var outValues = new Windows.Kinect.DetectionResult[outCollectionSize];
var managedDictionary = new RootSystem.Collections.Generic.Dictionary();
outCollectionSize = Windows_Kinect_Body_get_Appearance(_pNative, outKeys, outValues, outCollectionSize);
Helper.ExceptionHelper.CheckLastError();
for(int i=0;i Expressions
{
get
{
if (_pNative == RootSystem.IntPtr.Zero)
{
throw new RootSystem.ObjectDisposedException("Body");
}
int outCollectionSize = Windows_Kinect_Body_get_Expressions_Length(_pNative);
var outKeys = new Windows.Kinect.Expression[outCollectionSize];
var outValues = new Windows.Kinect.DetectionResult[outCollectionSize];
var managedDictionary = new RootSystem.Collections.Generic.Dictionary();
outCollectionSize = Windows_Kinect_Body_get_Expressions(_pNative, outKeys, outValues, outCollectionSize);
Helper.ExceptionHelper.CheckLastError();
for(int i=0;i JointOrientations
{
get
{
if (_pNative == RootSystem.IntPtr.Zero)
{
throw new RootSystem.ObjectDisposedException("Body");
}
int outCollectionSize = Windows_Kinect_Body_get_JointOrientations_Length(_pNative);
var outKeys = new Windows.Kinect.JointType[outCollectionSize];
var outValues = new Windows.Kinect.JointOrientation[outCollectionSize];
var managedDictionary = new RootSystem.Collections.Generic.Dictionary();
outCollectionSize = Windows_Kinect_Body_get_JointOrientations(_pNative, outKeys, outValues, outCollectionSize);
Helper.ExceptionHelper.CheckLastError();
for(int i=0;i Joints
{
get
{
if (_pNative == RootSystem.IntPtr.Zero)
{
throw new RootSystem.ObjectDisposedException("Body");
}
int outCollectionSize = Windows_Kinect_Body_get_Joints_Length(_pNative);
var outKeys = new Windows.Kinect.JointType[outCollectionSize];
var outValues = new Windows.Kinect.Joint[outCollectionSize];
var managedDictionary = new RootSystem.Collections.Generic.Dictionary();
outCollectionSize = Windows_Kinect_Body_get_Joints(_pNative, outKeys, outValues, outCollectionSize);
Helper.ExceptionHelper.CheckLastError();
for(int i=0;i