public override Line Cut(Line L, Point reference) { Point P = IntersectionPoint(L); if(P==null) return null; bool IsRefAtLeft = new Vector(P, reference) * L.Director.Normal > 0; bool IsOriginAtLeft = L.Director.Normal * new Vector(P,Origin) > 0; if (IsRefAtLeft == IsOriginAtLeft) return new LineSegment(P,Origin); if ((new Vector(P, reference) * L.Director.Normal) * (L.Director.Normal * new Vector(P, Origin)) == 0) return this; return new LineSegment(P, B); }
public Vector(Vector V) : base(V) { }
public Ray(Point P, Vector V) : base(P, V) { }
public Line(Line L) { _origin = new Point(L.Origin); Director = new Vector(L.Director); }
public Line(Point P, Point Q) { _origin = new Point(P); Director = new Vector(P,Q); }
public Line(Point P, Vector V) { _origin = new Point(P); Director = new Vector(V); }
public LineSegment(Point A, Vector V) : base(A, V) { }