FingerSliceTrail.cs 833 B

1234567891011121314151617181920212223242526272829
  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 FingerSliceTrail
  10. {
  11. public List<FingerSlice> Slices { get; private set; }
  12. public FingerSlice Start { get { return Slices[0]; } }
  13. public FingerSlice End { get { return Slices[Slices.Count - 1]; } }
  14. public int NumSlices { get { return Slices.Count; } }
  15. public LineSegment2D LineSegment { get { return new LineSegment2D(Start.Mid, End.Mid); } }
  16. public FingerSliceTrail(FingerSlice slice)
  17. {
  18. Slices = new List<FingerSlice>();
  19. Slices.Add(slice);
  20. }
  21. public void addSlice(FingerSlice slice)
  22. {
  23. Slices.Add(slice);
  24. }
  25. }
  26. }