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