Esempio n. 1
0
File: Input.cs Progetto: 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);
     }
 }
Esempio n. 2
0
 // This will be called whenever the position of one of the HaptiQs actuators changes.
 private void InputChanged(object sender, InputArgs args)
 {
     if (args.InputIdentifier == null)
     {
         Helper.Logger("HaptiQ_API.HaptiQsManager.InputChanged:: inputIdentifier is null");
     }
     else if (!_inputIdentifiersToHaptiQs.ContainsKey(args.InputIdentifier))
     {
         Helper.Logger("HaptiQ_API.HaptiQsManager.InputChanged:: inputIdentifier not in dictionary");
     }
     else if (!_HaptiQsDictionary.ContainsKey(_inputIdentifiersToHaptiQs[args.InputIdentifier]))
     {
         Helper.Logger("HaptiQ_API.HaptiQsManager.InputChanged:: HaptiQ not in dictionary");
     }
     else
     {
         HaptiQ haptiQ = _HaptiQsDictionary[_inputIdentifiersToHaptiQs[args.InputIdentifier]];
         haptiQ.position = args.Position;
         haptiQ.orientation = args.Orientation;
         handleBehaviours(haptiQ, args.Position, args.Orientation);
     }
 }
Esempio n. 3
0
 private void InputChanged(object sender,  InputArgs args)
 {
     _currentInputIdentifier = args.InputIdentifier;
     changeButtonColor(button3, _currentInputIdentifier != null);
 }