FingerSlice.cs 746 B

123456789101112131415161718192021222324252627
  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.Fingers
  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. Start = start;
  18. End = end;
  19. Mid = (start + end) / 2;
  20. LineSegment = new LineSegment2D(Start, End);
  21. Length = Start.getDistanceTo(End); ;
  22. }
  23. }
  24. }