FingerSlice.cs 762 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.Detectors.FingerDetection
  8. {
  9. class FingerSlice
  10. {
  11. public Vector2D Start { get; private set; }
  12. public Vector2D Mid { get; private set; }
  13. public Vector2D End { get; private set; }
  14. public LineSegment2D LineSegment { get; private set; }
  15. public float Length { get; private set; }
  16. public FingerSlice(Vector2D start, Vector2D end)
  17. {
  18. Start = start;
  19. End = end;
  20. Mid = (start + end) / 2;
  21. LineSegment = new LineSegment2D(Start, End);
  22. Length = Start.getDistanceTo(End); ;
  23. }
  24. }
  25. }