public override Line[] Split(Line L, bool Nullable) { //if (!IsInside(P)) return null; Point P = IntersectionPoint(L); Line[] lines; if (P == null) return null; if(P == Origin) { if(Nullable) return null; lines = new Line[1]; lines[0] = this; return lines; } lines = new Line[2]; lines[0] = new LineSegment(Origin, P); lines[1] = new Ray(P, Director); return lines; }
public Ray(Ray R) : base(R) { }
public virtual Line[] Split(Line L, bool Nullable) { //Nullable only exist to force it to childrens Point P = IntersectionPoint(L); if(P==null) return null; Ray [] rays = new Ray[2]; rays[0] = new Ray(P,Director); rays[1] = new Ray(P,-1*Director); return rays; }