Пример #1
0
 public void UpdateBody(BodyFrame bodyFrame)
 {
     if (bodyFrame == null)
     {
         return;
     }
     bodyFrame.CopyBodyData(ref _bodies);
 }
Пример #2
0
    public void OnNewFrame(BodyFrame frame)
    {
        if (frame.Width == 0 ||
            frame.Height == 0)
        {
            return;
        }

        if (_lastFrameIndex == frame.FrameIndex)
        {
            return;
        }

        _lastFrameIndex = frame.FrameIndex;

        frame.CopyBodyData(ref _bodies);
        if (_bodies.Length > 0)
        {
            UpdateBone(_bodies[0]);
        }
    }