using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using bbiwarg.Utility;
namespace bbiwarg.Recognition.FingerRecognition
{
///
/// A Finger consists of multiple FingerSlices, each one represented by a line preferrably orthogonal to the fingers direction.
///
public class FingerSlice
{
///
/// the point in the middle of the slice
///
public Vector2D Mid { get; private set; }
///
/// the start point of the slice
///
public Vector2D Start { get; private set; }
///
/// the end point of the slice
///
public Vector2D End { get; private set; }
///
/// the line segment connecting start and end
///
public LineSegment2D LineSegment { get; private set; }
///
/// the direction of the slice
///
public Vector2D Direction { get { return LineSegment.Direction; } }
///
/// the length of the slice (in pixels)
///
public float Length { get { return LineSegment.Length; } }
///
/// Initializes a new instance of the FingerSlice class.
///
/// The start point
/// The end point
public FingerSlice(Vector2D start, Vector2D end)
{
Start = start;
End = end;
Mid = (start + end) / 2;
LineSegment = new LineSegment2D(Start, End);
}
}
}