public NuiSkeletonFrame GetSkeleton() { int frame = Mathf.FloorToInt(Time.realtimeSinceStartup / playbackSpeed); if(frame > curFrame) { curFrame = frame; currentFrame = skeletonFrame[curFrame % skeletonFrame.Length]; } return currentFrame; }
public static extern int NuiTransformSmooth(ref NuiSkeletonFrame pSkeletonFrame,ref NuiTransformSmoothParameters pSmoothingParams);
public NuiSkeletonFrame deserialize() { NuiSkeletonFrame nui = new NuiSkeletonFrame(); nui.liTimeStamp = this.liTimeStamp; nui.dwFrameNumber = this.dwFrameNumber; nui.dwFlags = this.dwFlags; nui.vFloorClipPlane = this.vFloorClipPlane.deserialize(); nui.vNormalToGravity = this.vNormalToGravity.deserialize(); nui.SkeletonData = new NuiSkeletonData[6]; for(int ii = 0; ii < 6; ii++){ nui.SkeletonData[ii] = this.SkeletonData[ii].deserialize(); } return nui; }
public static extern int NuiSkeletonGetNextFrame(uint dwMillisecondsToWait, ref NuiSkeletonFrame pSkeletonFrame);
public SerialSkeletonFrame(NuiSkeletonFrame nui) { this.liTimeStamp = nui.liTimeStamp; this.dwFrameNumber = nui.dwFrameNumber; this.dwFlags = nui.dwFlags; this.vFloorClipPlane = new SerialVec4(nui.vFloorClipPlane); this.vNormalToGravity = new SerialVec4(nui.vNormalToGravity); this.SkeletonData = new SerialSkeletonData[6]; for(int ii = 0; ii < 6; ii++){ this.SkeletonData[ii] = new SerialSkeletonData(nui.SkeletonData[ii]); } }