void steadydetector_NotSteady(object sender, SteadyEventArgs e) { // System.Console.WriteLine("NotSteday.."); PointStatus pt = pointCollections[e.ID]; // if ( pt.is_non_steady==false) { // pt.nonsteady_counter = 0; if (pt.is_clicked == true) { pt.SetColor(Brushes.Red); } else { pt.SetColor(Brushes.Green); } pt.is_non_steady = true; pt.is_triggered = true; System.Console.WriteLine("Hand is moving..:"); } //flrouter.ActiveListener = pointCtrl; if (is_steady == 1) { is_push_allow_counter = 0; is_push_allow = 1; is_steady = 0; } }
void steadyDetector_Steady(object sender, SteadyEventArgs e) { Console.WriteLine("Steady {0} ({1})", e.ID, PrimaryID); if (e.ID == PrimaryID) { flowRouter.ActiveListener = swipeDetector; } }
void steadyDetector_Steady(object sender, SteadyEventArgs e) { Console.WriteLine("Steady {0} ({1})", e.ID, PrimaryID); if (e.ID == PrimaryID) { flowRouter.ActiveListener = swipeDetector; this.box.BackColor = Color.White; } }
/// <summary> /// Event handler for a steady hand gesture /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void steadyDetector_Steady(object sender, SteadyEventArgs e) { if (PositionX > leftBoundary && PositionX < rightBoundary) { Push = true; } /* * if (PositionY >= topBoundary || PositionY <= botBoundary) * { * VertSwipeStarted = true; * } * else * VertSwipeStarted = false; * * if (PositionX <= leftBoundary || PositionX >= rightBoundary) * { * HorSwipeStarted = true; * } * else * HorSwipeStarted = false;*/ }
void steadyDetector_Steady(object sender, SteadyEventArgs e) { if (control.sliderMode == true) { this.router.ActiveListener = this.aux_broadcaster; if (debug == true) { _print = true; debug_text = "Steady point - setting Listener to Auxilary Broadcast"; } } else { this.router.ActiveListener = this.broadcaster; if (debug == true) { _print = true; debug_text = "Steady point - setting Listener to Primary Broadcast"; } } this.gesture_display.Text = "Steady"; this.gesture_display.Image = Bitmap.FromFile("../../CVTEC Resources/link.ico"); }
void steadyDetector_Steady(object sender, SteadyEventArgs e) { Update(this.currentPoint, "steady"); }
void steadyDetector_Steady(object sender, SteadyEventArgs e) { SteadyDetected(sender, new SteadyDetectEventArgs(e)); }
void steadydetector_Steady(object sender, SteadyEventArgs e) { // System.Console.WriteLine("Steady Detected.."); PointStatus pt = pointCollections[e.ID]; HandPointContact hdc = null; is_steady = 1; for (int i = 0; i < HandPointBuffer.Count; i++) { hdc = HandPointBuffer[i] as HandPointContact; if (hdc.Id == e.ID) { break; } } pt.is_non_steady = false; pt.SetColor(Brushes.Yellow); int status = 0; Point3D hpoint = hdc.RowPoint; hpoint.Y = -hpoint.Y; Point3D pt3 = depthGen.ConvertRealWorldToProjective(hpoint); clipHandFromDepthMap(pt3); status = openpalm.isDetected(clipping, pt3); if (status == 1) { Console.WriteLine("OpenHand"); } else if (status == 2) { Console.WriteLine("Close Hand"); } Multitouch.Contracts.ContactState st = hdc.State; if (status == 1 && (st == Multitouch.Contracts.ContactState.Moved || st == Multitouch.Contracts.ContactState.New)) { pt.SetColor(Brushes.Green); pt.steady_state = 1; pt.is_clicked = false; System.Console.WriteLine("Release..."); hdc.Update(pt.steady_point.X, pt.steady_point.Y, Multitouch.Contracts.ContactState.Removed); inputProvider.EnqueueContact(hdc, Multitouch.Contracts.ContactState.Removed); pt.steady_point = pt.Location; } else if (status == 2 && st == Multitouch.Contracts.ContactState.Removed) { System.Console.WriteLine("Grab..."); pt.steady_state = 2; pt.is_clicked = true; pt.SetColor(Brushes.Red); hdc.Update(pt.steady_point.X, pt.steady_point.Y, Multitouch.Contracts.ContactState.New); inputProvider.EnqueueContact(hdc, Multitouch.Contracts.ContactState.New); pt.steady_point = pt.Location; } else { pt.steady_point = pt.Location; } }
void steadydetector_NotSteady(object sender, SteadyEventArgs e) { // System.Console.WriteLine("NotSteday.."); PointStatus pt = pointCollections[e.ID]; // if ( pt.is_non_steady==false) { // pt.nonsteady_counter = 0; if (pt.is_clicked == true) { pt.SetColor(Brushes.Red); } else { pt.SetColor(Brushes.Green); } pt.is_non_steady = true; pt.is_triggered = true; System.Console.WriteLine("Hand is moving..:"); } //flrouter.ActiveListener = pointCtrl; if(is_steady==1) { is_push_allow_counter = 0; is_push_allow = 1; is_steady=0; } }
void steadydetector_Steady(object sender, SteadyEventArgs e) { // System.Console.WriteLine("Steady Detected.."); PointStatus pt = pointCollections[e.ID]; HandPointContact hdc = null; is_steady = 1; for (int i = 0; i < HandPointBuffer.Count; i++) { hdc = HandPointBuffer[i] as HandPointContact; if (hdc.Id == e.ID) { break; } } pt.is_non_steady = false; pt.SetColor(Brushes.Yellow); int status = 0; Point3D hpoint = hdc.RowPoint; hpoint.Y = -hpoint.Y; Point3D pt3 = depthGen.ConvertRealWorldToProjective(hpoint); clipHandFromDepthMap(pt3); status = openpalm.isDetected(clipping, pt3); if (status == 1) { Console.WriteLine("OpenHand"); } else if(status==2) { Console.WriteLine("Close Hand"); } Multitouch.Contracts.ContactState st = hdc.State; if (status == 1 && (st == Multitouch.Contracts.ContactState.Moved || st == Multitouch.Contracts.ContactState.New)) { pt.SetColor(Brushes.Green); pt.steady_state = 1; pt.is_clicked = false; System.Console.WriteLine("Release..."); hdc.Update(pt.steady_point.X,pt.steady_point.Y, Multitouch.Contracts.ContactState.Removed); inputProvider.EnqueueContact(hdc, Multitouch.Contracts.ContactState.Removed); pt.steady_point = pt.Location; } else if (status == 2 && st == Multitouch.Contracts.ContactState.Removed) { System.Console.WriteLine("Grab..."); pt.steady_state = 2; pt.is_clicked = true; pt.SetColor(Brushes.Red); hdc.Update( pt.steady_point.X, pt.steady_point.Y, Multitouch.Contracts.ContactState.New); inputProvider.EnqueueContact(hdc, Multitouch.Contracts.ContactState.New); pt.steady_point = pt.Location; } else { pt.steady_point = pt.Location; } }
void HandleSteadyDetectorSteady(object sender, SteadyEventArgs e) { steadyEvent = true; Debug.Log("Steady Detected: " + e.ID); }
// 動作の停止を通知する void steadyDetector_Steady(object sender, SteadyEventArgs e) { ++steadCount; }
// 動作の停止を通知する void steadyDetector_Steady(object sender, SteadyEventArgs e) { ++steadCount; }
/// <summary> /// Event handler for a steady hand gesture /// </summary> /// <param name="sender"></param> /// <param name="e"></param> static void steadyDetector_Steady(object sender, SteadyEventArgs e) { if (PositionX > leftBoundary && PositionX < rightBoundary) Push = true; /* if (PositionY >= topBoundary || PositionY <= botBoundary) { VertSwipeStarted = true; } else VertSwipeStarted = false; if (PositionX <= leftBoundary || PositionX >= rightBoundary) { HorSwipeStarted = true; } else HorSwipeStarted = false;*/ }
public SteadyDetectEventArgs(SteadyEventArgs e) : this(e.Velocity) { }
/// callback when we become unsteady /// @param sender the object that sent the event /// @param e the event arguments void DetectNotSteadyEvent(object sender, SteadyEventArgs e) { m_currentSteady = false; }
// private methods (callbacks) /// callback when we become steady /// @param sender the object that sent the event /// @param e the event arguments void DetectSteadyEvent(object sender, SteadyEventArgs e) { m_currentSteady = true; m_firstSteady = Time.time; m_firedSteadyEvent = false; }