Пример #1
0
 public MultiSourceFrameArrivedEventArgs(long timestamp, Windows.Kinect.ColorFrame colorFrame,
                                         Windows.Kinect.DepthFrame depthFrame, Windows.Kinect.BodyFrame bodyFrame,
                                         Windows.Kinect.BodyIndexFrame bodyIndexFrame, Windows.Kinect.InfraredFrame infraredFrame) : base(timestamp)
 {
     ColorFrame     = colorFrame;
     DepthFrame     = depthFrame;
     BodyFrame      = bodyFrame;
     BodyIndexFrame = bodyIndexFrame;
     InfraredFrame  = infraredFrame;
 }
Пример #2
0
        public Windows.Kinect.BodyIndexFrame AcquireFrame()
        {
            if (_pNative == RootSystem.IntPtr.Zero)
            {
                throw new RootSystem.ObjectDisposedException("BodyIndexFrameReference");
            }

            RootSystem.IntPtr objectPointer = Windows_Kinect_BodyIndexFrameReference_AcquireFrame(_pNative);
            if (objectPointer == RootSystem.IntPtr.Zero)
            {
                return null;
            }

            objectPointer = Helper.NativeObjectCache.MapToIUnknown(objectPointer);
            var obj = Helper.NativeObjectCache.GetObject<Windows.Kinect.BodyIndexFrame>(objectPointer);
            if (obj == null)
            {
                obj = new Windows.Kinect.BodyIndexFrame(objectPointer);
                Helper.NativeObjectCache.AddObject<Windows.Kinect.BodyIndexFrame>(objectPointer, obj);
            }

            return obj;
        }