using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using bbiwarg.Detectors.Fingers; using bbiwarg.Utility; namespace bbiwarg.Detectors.Touch { class TouchEvent { private Vector2D _position; public Vector2D Position { get { return _position; } private set { _position = value; } } private float _floodValue; public float FloodValue { get { return _floodValue; } private set { _floodValue = value; } } private Finger _finger; public Finger Finger { get { return _finger; } private set { _finger = value; } } public TouchEvent(Vector2D position, float floodValue, Finger finger) { Position = position; FloodValue = floodValue; Finger = finger; } public bool isSimilarTo(TouchEvent compareTouchEvent) { float maxDistance = 20; float distance = Position.getDistanceTo(compareTouchEvent.Position); return (distance < maxDistance); } } }