Beispiel #1
0
        /**
         * return true if leap is available and parsing suceed. False otherwise.
         * Simply a	replacement, instead of using onFrame, thus syncing with app's pace, if called in update() method.
         * */
        public override bool update()
        {
            if (!controller.IsServiceConnected())
            {
                return(false);
            }
            if (!controller.IsConnected)
            {
                return(false);
            }
            Frame frame = controller.Frame();
            //HandList hands = frame.Hands;
            //PointableList pointables = frame.Pointables;
            //FingerList fingers = frame.Fingers;
            //ToolList tools = frame.Tools;
            Hand hand = frame.Hands.Frontmost;

            change(hand);
            return(rotation(hand));
        }
Beispiel #2
0
        /**
         * return true if leap is available and parsing suceed. False otherwise.
         * Simply a	replacement, instead of using onFrame, thus syncing with app's pace, if called in update() method.
         * */
        public override bool update()
        {
            Frame frame;

            if (!controller.IsServiceConnected())
            {
                return(false);
            }
            if (!controller.IsConnected)
            {
                return(false);
            }
            frame = controller.Frame();


            bool ret = rotation(frame);

            if (!ret)
            {
                ret = swipe(frame);
            }
            //previousFrame = frame;
            return(ret);
        }