Exemplo n.º 1
0
Arquivo: Input.cs Projeto: sic2/HaptiQ
 protected virtual void OnChanged(InputIdentifier inputIdentifier, Point position, double orientation)
 {
     if (Changed != null)
     {
         InputArgs args = new InputArgs(inputIdentifier, position, orientation + Math.PI / 2.0);
         Changed(this, args);
     }
 }
Exemplo n.º 2
0
 private void manageTouches(ReadOnlyTouchPointCollection touches)
 {
     foreach (TouchPoint touch in touches)
     {
         if (touch.IsTagRecognized)
         {
             InputIdentifier inputIdentifier = new InputIdentifier(InputIdentifier.TYPE.tag, -1, (ulong)touch.Tag.Value);
             OnChanged(inputIdentifier, new Point(touch.CenterX, touch.CenterY), touch.Orientation);  
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a wrapper for the arguments of the event
 /// </summary>
 /// <param name="inputIdentifier"></param>
 /// <param name="position"></param>
 /// <param name="orientation"></param>
 public InputArgs(InputIdentifier inputIdentifier, Point position, double orientation)
 {
     InputIdentifier = inputIdentifier;
     Position = position;
     Orientation = orientation;
 }
Exemplo n.º 4
0
 public InputIdentifier getInputIdentifier()
 {
     InputIdentifier inputIdentifier = new InputIdentifier(this);
     return inputIdentifier;
 }
Exemplo n.º 5
0
 private void InputChanged(object sender,  InputArgs args)
 {
     _currentInputIdentifier = args.InputIdentifier;
     changeButtonColor(button3, _currentInputIdentifier != null);
 }