Beispiel #1
0
 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);
 }
Beispiel #2
0
 public Vector(Vector V)
     : base(V)
 {
 }
Beispiel #3
0
 public Ray(Point P, Vector V)
     : base(P, V)
 {
 }
Beispiel #4
0
 public Line(Line L)
 {
     _origin = new Point(L.Origin);
     Director = new Vector(L.Director);
 }
Beispiel #5
0
 public Line(Point P, Point Q)
 {
     _origin = new Point(P);
     Director = new Vector(P,Q);
 }
Beispiel #6
0
 public Line(Point P, Vector V)
 {
     _origin = new Point(P);
     Director = new Vector(V);
 }
Beispiel #7
0
 public LineSegment(Point A, Vector V)
     : base(A, V)
 {
 }