コード例 #1
0
        public void Start()
        {
            #region IGesturePartEnums

            /// <summary>
            /// enums for storing the gesture patterns
            /// </summary>
            IGesturePart[] RightHandQuicklyClosed1 = new IGesturePart[]
            {
            Gesture.open, Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed2 = new IGesturePart[]
            {
            Gesture.open, Gesture.closed,Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed3 = new IGesturePart[]
            {
            Gesture.open, Gesture.closed,Gesture.closed, Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed4 = new IGesturePart[]
            {
            Gesture.open, Gesture.closed,Gesture.closed, Gesture.closed, Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed5 = new IGesturePart[]
            {
            Gesture.open, Gesture.closed,Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed6 = new IGesturePart[]
            {
            Gesture.open, Gesture.closed,Gesture.closed, Gesture.closed, Gesture.closed,Gesture.closed,Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed7 = new IGesturePart[]
            {
            Gesture.open, Gesture.closed,Gesture.closed, Gesture.closed, Gesture.closed,Gesture.closed,Gesture.closed,Gesture.closed, Gesture.open
            };

            IGesturePart[] RightHandQuicklyOpened = new IGesturePart[]
                {
                Gesture.closed, Gesture.open, Gesture.closed
                };
            IGesturePart[] RightHandOpen = new IGesturePart[]
                {
                //1x closed
                //Gesture.closed,
                //15x open
                Gesture.open, Gesture.open, Gesture.open, Gesture.open, Gesture.open,
                Gesture.open, Gesture.open, //Gesture.open, Gesture.open, Gesture.open,
               // Gesture.open, Gesture.open, Gesture.open, Gesture.open, Gesture.open
                };
            IGesturePart[] RightHandClosed = new IGesturePart[]
                {
                //1x open
                //Gesture.open,
                //15x closed
                Gesture.open, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed,
                Gesture.closed, Gesture.closed, //Gesture.closed, Gesture.closed, Gesture.closed,
                //Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed
                //Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed
                };

            #endregion

            //prepare gesture
            gestureClosed = new Gesture(RightHandClosed);
            gestureClosed.name = "gestureClosed";
            gestureOpen = new Gesture(RightHandOpen);
            gestureOpen.name = "gestureOpen";
            gestureQuicklyClosed1 = new Gesture(RightHandQuicklyClosed1);
            gestureQuicklyClosed2 = new Gesture(RightHandQuicklyClosed2);
            gestureQuicklyClosed3 = new Gesture(RightHandQuicklyClosed3);
            gestureQuicklyClosed4 = new Gesture(RightHandQuicklyClosed4);
            gestureQuicklyClosed5 = new Gesture(RightHandQuicklyClosed5);
            gestureQuicklyClosed6 = new Gesture(RightHandQuicklyClosed6);
            gestureQuicklyClosed7 = new Gesture(RightHandQuicklyClosed7);
            gestureQuicklyClosed1.name = "gestureQuicklyClosed1";
            gestureQuicklyClosed2.name = "gestureQuicklyClosed2";
            gestureQuicklyClosed3.name = "gestureQuicklyClosed3";
            gestureQuicklyClosed4.name = "gestureQuicklyClosed4";
            gestureQuicklyClosed2.name = "gestureQuicklyClosed5";
            gestureQuicklyClosed3.name = "gestureQuicklyClosed6";
            gestureQuicklyClosed4.name = "gestureQuicklyClosed7";
            gestureQuicklyOpen = new Gesture(RightHandQuicklyOpened);
            gestureQuicklyOpen.name = "gestureQuicklyOpen";
        }
コード例 #2
0
        public void Start()
        {
            #region IGesturePartEnums

            /// <summary>
            /// enums for storing the gesture patterns
            /// </summary>
            IGesturePart[] RightHandQuicklyClosed1 = new IGesturePart[]
            {
                Gesture.open, Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed2 = new IGesturePart[]
            {
                Gesture.open, Gesture.closed, Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed3 = new IGesturePart[]
            {
                Gesture.open, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed4 = new IGesturePart[]
            {
                Gesture.open, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed5 = new IGesturePart[]
            {
                Gesture.open, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed6 = new IGesturePart[]
            {
                Gesture.open, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.open
            };
            IGesturePart[] RightHandQuicklyClosed7 = new IGesturePart[]
            {
                Gesture.open, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.open
            };

            IGesturePart[] RightHandQuicklyOpened = new IGesturePart[]
            {
                Gesture.closed, Gesture.open, Gesture.closed
            };
            IGesturePart[] RightHandOpen = new IGesturePart[]
            {
                //1x closed
                //Gesture.closed,
                //15x open
                Gesture.open, Gesture.open, Gesture.open, Gesture.open, Gesture.open,
                Gesture.open, Gesture.open, //Gesture.open, Gesture.open, Gesture.open,
                // Gesture.open, Gesture.open, Gesture.open, Gesture.open, Gesture.open
            };
            IGesturePart[] RightHandClosed = new IGesturePart[]
            {
                //1x open
                //Gesture.open,
                //15x closed
                Gesture.open, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed,
                Gesture.closed, Gesture.closed, //Gesture.closed, Gesture.closed, Gesture.closed,
                //Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed
                //Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed, Gesture.closed
            };

            #endregion

            //prepare gesture
            gestureClosed              = new Gesture(RightHandClosed);
            gestureClosed.name         = "gestureClosed";
            gestureOpen                = new Gesture(RightHandOpen);
            gestureOpen.name           = "gestureOpen";
            gestureQuicklyClosed1      = new Gesture(RightHandQuicklyClosed1);
            gestureQuicklyClosed2      = new Gesture(RightHandQuicklyClosed2);
            gestureQuicklyClosed3      = new Gesture(RightHandQuicklyClosed3);
            gestureQuicklyClosed4      = new Gesture(RightHandQuicklyClosed4);
            gestureQuicklyClosed5      = new Gesture(RightHandQuicklyClosed5);
            gestureQuicklyClosed6      = new Gesture(RightHandQuicklyClosed6);
            gestureQuicklyClosed7      = new Gesture(RightHandQuicklyClosed7);
            gestureQuicklyClosed1.name = "gestureQuicklyClosed1";
            gestureQuicklyClosed2.name = "gestureQuicklyClosed2";
            gestureQuicklyClosed3.name = "gestureQuicklyClosed3";
            gestureQuicklyClosed4.name = "gestureQuicklyClosed4";
            gestureQuicklyClosed2.name = "gestureQuicklyClosed5";
            gestureQuicklyClosed3.name = "gestureQuicklyClosed6";
            gestureQuicklyClosed4.name = "gestureQuicklyClosed7";
            gestureQuicklyOpen         = new Gesture(RightHandQuicklyOpened);
            gestureQuicklyOpen.name    = "gestureQuicklyOpen";
        }