コード例 #1
0
        public UserTrackerFrameRef ReadFrame()
        {
            IntPtr handle;

            NiTE.ThrowIfError(UserTracker_readFrame(this.Handle, out handle));
            return(new UserTrackerFrameRef(handle));
        }
コード例 #2
0
        public HandTrackerFrameRef ReadFrame()
        {
            IntPtr newFrame;

            NiTE.ThrowIfError(HandTracker_readFrame(this.Handle, out newFrame));
            return(new HandTrackerFrameRef(newFrame));
        }
コード例 #3
0
        public PointF ConvertJointCoordinatesToDepth(Point3D depth)
        {
            float pX, pY;

            NiTE.ThrowIfError(
                this.ConvertJointCoordinatesToDepth((float)depth.X, (float)depth.Y, (float)depth.Z, out pX, out pY));
            return(new PointF(pX, pY));
        }
コード例 #4
0
        public PointF ConvertDepthCoordinatesToHand(Point3D depth)
        {
            float pX, pY;

            NiTE.ThrowIfError(
                this.ConvertDepthCoordinatesToHand((int)depth.X, (int)depth.Y, (int)depth.Z, out pX, out pY));
            return(new PointF(pX, pY));
        }
コード例 #5
0
        public static UserTracker Create(Device device = null)
        {
            IntPtr deviceHandle = IntPtr.Zero;

            if (device != null && device.IsValid)
            {
                deviceHandle = device.Handle;
            }

            IntPtr handle;

            NiTE.ThrowIfError(UserTracker_create(out handle, deviceHandle));
            UserTracker ut = new UserTracker(handle);

            ut.handlerEvents = UserTracker_RegisterListener(handle, ut.internalListener);
            return(ut);
        }