|
|
@ -20,11 +20,7 @@ namespace KinectUtils
|
|
|
|
|
|
|
|
|
|
|
|
public static void AddGestures(IGestureFactory factory)
|
|
|
|
public static void AddGestures(IGestureFactory factory)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var gestures = factory.CreateGestures();
|
|
|
|
KnownGestures = (List<BaseGesture>)factory.CreateGestures();
|
|
|
|
foreach (var gesture in gestures)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AddGesture(gesture);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public static void AddGesture(BaseGesture gesture)
|
|
|
|
public static void AddGesture(BaseGesture gesture)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -55,7 +51,14 @@ namespace KinectUtils
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (bodyframe != null)
|
|
|
|
if (bodyframe != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(bodies == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bodies = new Body[bodyframe.BodyCount];
|
|
|
|
|
|
|
|
}
|
|
|
|
bodyframe.GetAndRefreshBodyData(bodies);
|
|
|
|
bodyframe.GetAndRefreshBodyData(bodies);
|
|
|
|
|
|
|
|
if (bodies != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
foreach (var body in bodies)
|
|
|
|
foreach (var body in bodies)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (body.IsTracked)
|
|
|
|
if (body.IsTracked)
|
|
|
@ -71,3 +74,4 @@ namespace KinectUtils
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|