12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using bbiwarg.Recognition.FingerRecognition;
- using bbiwarg.Recognition.PalmRecognition;
- using bbiwarg.Recognition.Tracking;
- using bbiwarg.Utility;
- using Emgu.CV;
- using Emgu.CV.Structure;
- namespace bbiwarg.Recognition.TouchRecognition
- {
- /// <summary>
- /// Represents a touch (Finger<->Palm)
- /// </summary>
- public class Touch : TrackableObject
- {
- /// <summary>
- /// the absolute position of the touch
- /// </summary>
- public Vector2D AbsolutePosition { get; private set; }
- /// <summary>
- /// the relative position of the touch within the palm quad
- /// </summary>
- public Vector2D RelativePosition { get; private set; }
- /// <summary>
- /// the touching finger
- /// </summary>
- public Finger Finger { get; private set; }
- /// <summary>
- /// the touched palm
- /// </summary>
- public Palm Palm { get; private set; }
- /// <summary>
- /// Initializes a new instance of the Touch class.
- /// </summary>
- /// <param name="absolutePosition">The absolute position.</param>
- /// <param name="finger">The touching finger.</param>
- /// <param name="palm">The touched palm.</param>
- public Touch(Vector2D absolutePosition, Finger finger, Palm palm)
- {
- AbsolutePosition = absolutePosition;
- RelativePosition = palm.getRelativePosition(absolutePosition);
- Finger = finger;
- Palm = palm;
- finger.Touch = this;
- }
- }
- }
|