Ejemplo n.º 1
0
        void pushDetector_Push(object sender, VelocityAngleEventArgs e)
        {
            if (control.sliderMode == true)
            {
                control.setPlaybackPosition(playback_position);
                this.router.ActiveListener = this.steadyDetector;
                control.leaveSliderMode();

                if (debug == true)
                {
                    _print     = true;
                    debug_text = "Leaving Slider Mode and setting playback position--setting active listener to Steady Detector";
                }
            }
            else if (control.sliderMode == false)
            {
                this.router.ActiveListener = this.steadyDetector;
                control.enterSliderMode();

                if (debug == true)
                {
                    _print     = true;
                    debug_text = "Entering slider mode; use hand to set a position";
                }
            }

            if (debug == true)
            {
                this._print     = true;
                this.debug_text = "Push event detected";
            }

            this.gesture_display.Text  = "Push Gesture";
            this.gesture_display.Image = Bitmap.FromFile("../../CVTEC Resources/delete.ico");
        }
Ejemplo n.º 2
0
        void aux_pushDect_Push(object sender, VelocityAngleEventArgs e)
        {
            control.setPlaybackPosition(playback_position);
            this.router.ActiveListener = this.steadyDetector;
            control.leaveSliderMode();

            if (debug == true)
            {
                _print     = true;
                debug_text = "Leaving Slider Mode and setting playback position--setting active listener to Steady Detector";
            }
        }
Ejemplo n.º 3
0
        void swipeDetector_SwipeRight(object sender, VelocityAngleEventArgs e)
        {
            control.togglePlay();

            if (debug == true)
            {
                this._print     = true;
                this.debug_text = "Right swipe detected";
            }
            this.router.ActiveListener = this.steadyDetector;
            this.gesture_display.Image = Bitmap.FromFile("../../CVTEC Resources/arrow_right.ico");
            this.gesture_display.Text  = "Right Swipe";
        }
Ejemplo n.º 4
0
        void swipeDetector_SwipeDown(object sender, VelocityAngleEventArgs e)
        {
            control.decreaseZoom();

            if (debug == true)
            {
                _print     = true;
                debug_text = "Downward swipe detected";
            }
            this.router.ActiveListener = this.steadyDetector;
            this.gesture_display.Text  = "Swipe Down";
            this.gesture_display.Image = Bitmap.FromFile("../../CVTEC Resources/arrow_down.ico");
        }
Ejemplo n.º 5
0
        void swipeDetector_SwipeLeft(object sender, VelocityAngleEventArgs e)
        {
            control.toggleFullscreen();

            if (debug == true)
            {
                _print     = true;
                debug_text = "Left swipe detected.";
            }
            this.router.ActiveListener = this.steadyDetector;

            this.gesture_display.Text  = "Left Swipe";
            this.gesture_display.Image = Bitmap.FromFile("../../CVTEC Resources/arrow_left.ico");
        }
 // 右方向への動きを通知する
 void swipeDetector_SwipeRight(object sender, VelocityAngleEventArgs e)
 {
     brush = new SolidBrush(Color.Blue);
 }
 // 左方向への動きを通知する
 void swipeDetector_SwipeLeft(object sender, VelocityAngleEventArgs e)
 {
     brush = new SolidBrush(Color.Red);
 }
 // Pushの検出を通知する
 void pushDetector_Push(object sender, VelocityAngleEventArgs e)
 {
     ++pushCount;
 }
Ejemplo n.º 9
0
 void HandleSwipeDetectorSwipeRight(object sender, VelocityAngleEventArgs e)
 {
     //c.nite.HUD.text = "Swipe Right Detected: " + e.Angle + ", " + e.Velocity;
     swipeRight = true;
 }
Ejemplo n.º 10
0
    protected float m_immediateDuration;   ///< the duration in seconds to continue after pushing where push is still "in progress"

    // private methods (callbacks)

    /// callback when we detect a push
    /// @param sender the object that sent the event
    /// @param e the event arguments
    void PushDetected(object sender, VelocityAngleEventArgs e)
    {
        m_timeDetected  = Time.time;
        m_frameDetected = Time.frameCount;
        DetectGesture();
    }
Ejemplo n.º 11
0
 void pushDetector_Push(object sender, VelocityAngleEventArgs e)
 {
     Console.WriteLine("Push detected");
 }
 // 左方向への動きを通知する
 void swipeDetector_SwipeLeft(object sender, VelocityAngleEventArgs e)
 {
     brush = new SolidBrush(Color.Red);
 }
        void pushDetect_Push(object sender, VelocityAngleEventArgs e)
        {
            // System.Console.WriteLine("PushDetected");
            HandPointContact hdc = null;
            is_push = 1;
            is_push_stable = 0;
            push_counter = 0;
             /*   for (int i = 0; i < HandPointBuffer.Count; i++)
            {
                hdc = HandPointBuffer[i] as HandPointContact;

                if (hdc.Id == clickPoint.Id)
                {
                    clickPoint = hdc;
                    break;
                }
            }*/
            foreach (PointStatus pt in pointCollections)
            {

                if (pt.is_clicked == true)
                {
                    System.Console.WriteLine(pt.Handle.ToString());
                    pt.is_clicked = false;
                          for (int i = 0; i < HandPointBuffer.Count; i++)
                            {
                                hdc = HandPointBuffer[i] as HandPointContact;

                                if (hdc.Id == pt.Handle)
                                {
                                    clickPoint = hdc;
                                    break;
                                }
                            }
                       switch (hdc.State)
                    {
                        case Multitouch.Contracts.ContactState.Moved:  //now remove
                            hdc.Update((int)pt.Location.X, (int)pt.Location.Y, Multitouch.Contracts.ContactState.Removed);
                            inputProvider.EnqueueContact(clickPoint, Multitouch.Contracts.ContactState.Removed);
                         //   System.Console.WriteLine("Removed..");

                            pt.SetColor(Brushes.Green);
                            break;

                        case Multitouch.Contracts.ContactState.New://move
                            hdc.Update((int)pt.Location.X, (int)pt.Location.Y, Multitouch.Contracts.ContactState.Moved);
                            inputProvider.EnqueueContact(clickPoint, Multitouch.Contracts.ContactState.Moved);
                            break;
                        case Multitouch.Contracts.ContactState.Removed://create new
                            hdc.Update((int)pt.Location.X, (int)pt.Location.Y, Multitouch.Contracts.ContactState.New);
                            inputProvider.EnqueueContact(clickPoint, Multitouch.Contracts.ContactState.New);

                        //    System.Console.WriteLine("Created..");
                            pt.SetColor(Brushes.Red);
                            break;

                    }
                }
            }
               // is_steady = 0;
               // flrouter.ActiveListener = null;
        }
Ejemplo n.º 14
0
 void HandleSwipeDetectorSwipeLeft(object sender, VelocityAngleEventArgs e)
 {
     Debug.Log("Swipe Detected: " + e.Angle + ", " + e.Velocity);
 }
 // 上方向への動きを通知する
 void swipeDetector_SwipeUp(object sender, VelocityAngleEventArgs e)
 {
     brush = new SolidBrush(Color.Yellow);
 }
 // 右方向への動きを通知する
 void swipeDetector_SwipeRight(object sender, VelocityAngleEventArgs e)
 {
     brush = new SolidBrush(Color.Blue);
 }
 // 下方向への動きを通知する
 void swipeDetector_SwipeDown(object sender, VelocityAngleEventArgs e)
 {
     brush = new SolidBrush(Color.Green);
 }
Ejemplo n.º 18
0
 void pushDetector_Push(object sender, VelocityAngleEventArgs e)
 {
     Update(this.currentPoint, "push");
 }
 // 上方向への動きを通知する
 void swipeDetector_SwipeUp(object sender, VelocityAngleEventArgs e)
 {
     brush = new SolidBrush(Color.Yellow);
 }
 // 下方向への動きを通知する
 void swipeDetector_SwipeDown(object sender, VelocityAngleEventArgs e)
 {
     brush = new SolidBrush(Color.Green);
 }
Ejemplo n.º 21
0
        void pushDetect_Push(object sender, VelocityAngleEventArgs e)
        {
            // System.Console.WriteLine("PushDetected");
            HandPointContact hdc = null;

            is_push        = 1;
            is_push_stable = 0;
            push_counter   = 0;

            /*   for (int i = 0; i < HandPointBuffer.Count; i++)
             * {
             *     hdc = HandPointBuffer[i] as HandPointContact;
             *
             *     if (hdc.Id == clickPoint.Id)
             *     {
             *         clickPoint = hdc;
             *         break;
             *     }
             * }*/
            foreach (PointStatus pt in pointCollections)
            {
                if (pt.is_clicked == true)
                {
                    System.Console.WriteLine(pt.Handle.ToString());
                    pt.is_clicked = false;
                    for (int i = 0; i < HandPointBuffer.Count; i++)
                    {
                        hdc = HandPointBuffer[i] as HandPointContact;

                        if (hdc.Id == pt.Handle)
                        {
                            clickPoint = hdc;
                            break;
                        }
                    }
                    switch (hdc.State)
                    {
                    case Multitouch.Contracts.ContactState.Moved:      //now remove
                        hdc.Update((int)pt.Location.X, (int)pt.Location.Y, Multitouch.Contracts.ContactState.Removed);
                        inputProvider.EnqueueContact(clickPoint, Multitouch.Contracts.ContactState.Removed);
                        //   System.Console.WriteLine("Removed..");

                        pt.SetColor(Brushes.Green);
                        break;


                    case Multitouch.Contracts.ContactState.New:    //move
                        hdc.Update((int)pt.Location.X, (int)pt.Location.Y, Multitouch.Contracts.ContactState.Moved);
                        inputProvider.EnqueueContact(clickPoint, Multitouch.Contracts.ContactState.Moved);
                        break;

                    case Multitouch.Contracts.ContactState.Removed:    //create new
                        hdc.Update((int)pt.Location.X, (int)pt.Location.Y, Multitouch.Contracts.ContactState.New);
                        inputProvider.EnqueueContact(clickPoint, Multitouch.Contracts.ContactState.New);

                        //    System.Console.WriteLine("Created..");
                        pt.SetColor(Brushes.Red);
                        break;
                    }
                }
            }
            // is_steady = 0;
            // flrouter.ActiveListener = null;
        }
Ejemplo n.º 22
0
 // Pushの検出を通知する
 void pushDetector_Push(object sender, VelocityAngleEventArgs e)
 {
     ++pushCount;
 }
Ejemplo n.º 23
0
 void pushDetector_Push(object sender, VelocityAngleEventArgs e)
 {
     Leave();
 }
Ejemplo n.º 24
0
 void pushDetector_Push(object sender, VelocityAngleEventArgs e)
 {
     Leave();
 }