123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using bbiwarg.Utility;
- namespace bbiwarg.Detectors.Fingers
- {
- class FingerSliceTrail
- {
- private List<FingerSlice> slices;
- public FingerSlice Start { get { return slices[0]; } }
- public FingerSlice End { get { return slices[slices.Count - 1]; } }
- public FingerSlice this[int index] { get { return slices[index]; } }
- public int NumSlices { get { return slices.Count; } }
- public LineSegment2D LineSegment { get { return new LineSegment2D(Start.Mid, End.Mid); } }
- public FingerSliceTrail(FingerSlice slice)
- {
- slices = new List<FingerSlice>();
- slices.Add(slice);
- }
- public void addSlice(FingerSlice slice)
- {
- slices.Add(slice);
- }
- public List<FingerSlice> getSlices()
- {
- return slices;
- }
- public void reverse() {
- slices.Reverse();
- }
- }
- }
|