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
{
///
/// Represents a touch (Finger<->Palm)
///
public class Touch : TrackableObject
{
///
/// the absolute position of the touch
///
public Vector2D AbsolutePosition { get; private set; }
///
/// the relative position of the touch within the palm quad
///
public Vector2D RelativePosition { get; private set; }
///
/// the touching finger
///
public Finger Finger { get; private set; }
///
/// the touched palm
///
public Palm Palm { get; private set; }
///
/// Initializes a new instance of the Touch class.
///
/// The absolute position.
/// The touching finger.
/// The touched palm.
public Touch(Vector2D absolutePosition, Finger finger, Palm palm)
{
AbsolutePosition = absolutePosition;
RelativePosition = palm.getRelativePosition(absolutePosition);
Finger = finger;
Palm = palm;
finger.Touch = this;
}
}
}