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"); }
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"; } }
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"; }
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"); }
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; }
void HandleSwipeDetectorSwipeRight(object sender, VelocityAngleEventArgs e) { //c.nite.HUD.text = "Swipe Right Detected: " + e.Angle + ", " + e.Velocity; swipeRight = true; }
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(); }
void pushDetector_Push(object sender, VelocityAngleEventArgs e) { Console.WriteLine("Push detected"); }
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; }
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_SwipeDown(object sender, VelocityAngleEventArgs e) { brush = new SolidBrush(Color.Green); }
void pushDetector_Push(object sender, VelocityAngleEventArgs e) { Update(this.currentPoint, "push"); }
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; }
void pushDetector_Push(object sender, VelocityAngleEventArgs e) { Leave(); }