public LineSegment(int id, SlopedLine l, Coord from, Coord to, SegmentType type, LineDirection direction) { if (type == SegmentType.Slope && from != to) { throw new ArgumentException("Slopes can only be size 1"); } Id = id; Origin = l; From = from; To = to; Type = type; Direction = direction; }
public LineSegment(SlopedLine l, Coord from, Coord to, SegmentType type, LineDirection direction) : this(PaintAbles.Id++, l, from, to, type, direction) { }
public LineSegment(int id, SlopedLine l, Coord from, Coord to, SegmentType type) : this(id, l, from, to, type, Vector.GetDirection(from, to)) { }
public LineSegment(SlopedLine l, Coord from, Coord to, SegmentType type) : this(PaintAbles.Id++, l, from, to, type, Vector.GetDirection(from, to)) { }