Esempio n. 1
0
    public static bool PollSkeleton(NuiTransformSmoothParameters smoothParameters, ref NuiSkeletonFrame skeletonFrame)
    {
        bool newSkeleton = false;

        int hr = KinectWrapper.NuiSkeletonGetNextFrame(0, ref skeletonFrame);

        if (hr == 0)
        {
            newSkeleton = true;
        }

        if (newSkeleton)
        {
            hr = KinectWrapper.NuiTransformSmooth(ref skeletonFrame, ref smoothParameters);
            if (hr != 0)
            {
                Debug.Log("Skeleton Data Smoothing failed");
            }
        }

        return(newSkeleton);
    }