FingerSlice.cs 810 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using bbiwarg.Utility;
  7. namespace bbiwarg.Recognition.FingerRecognition
  8. {
  9. class FingerSlice
  10. {
  11. public Vector2D Mid { get; private set; }
  12. public Vector2D Start { get; private set; }
  13. public Vector2D End { get; private set; }
  14. public LineSegment2D LineSegment { get; private set; }
  15. public Vector2D Direction { get { return LineSegment.Direction; } }
  16. public float Length { get { return LineSegment.Length; } }
  17. public FingerSlice(Vector2D start, Vector2D end)
  18. {
  19. Start = start;
  20. End = end;
  21. Mid = (start + end) / 2;
  22. LineSegment = new LineSegment2D(Start, End);
  23. }
  24. }
  25. }