Beispiel #1
0
 public bool IsLineJoinGeoXYRectWithoutPointInRect(GeoXYPoint pt1, GeoXYPoint pt2)
 {
     GeoVectorMultiple geoVectMulti = new GeoVectorMultiple();
     geoVectMulti.L1AndL2P1 = this.VectorMultiple(pt1, pt2, this[0]);
     geoVectMulti.L1AndL2P2 = this.VectorMultiple(pt1, pt2, this[1]);
     geoVectMulti.L2AndL1P1 = this.VectorMultiple(this[0], this[1], pt1);
     geoVectMulti.L2AndL1P2 = this.VectorMultiple(this[0], this[1], pt2);
     if (this.IsIntersectLine(geoVectMulti))
     {
         return true;
     }
     geoVectMulti.L1AndL2P1 = this.VectorMultiple(pt1, pt2, this[1]);
     geoVectMulti.L1AndL2P2 = this.VectorMultiple(pt1, pt2, this[2]);
     geoVectMulti.L2AndL1P1 = this.VectorMultiple(this[1], this[2], pt1);
     geoVectMulti.L2AndL1P2 = this.VectorMultiple(this[1], this[2], pt2);
     if (this.IsIntersectLine(geoVectMulti))
     {
         return true;
     }
     geoVectMulti.L1AndL2P1 = this.VectorMultiple(pt1, pt2, this[2]);
     geoVectMulti.L1AndL2P2 = this.VectorMultiple(pt1, pt2, this[3]);
     geoVectMulti.L2AndL1P1 = this.VectorMultiple(this[2], this[3], pt1);
     geoVectMulti.L2AndL1P2 = this.VectorMultiple(this[2], this[3], pt2);
     if (this.IsIntersectLine(geoVectMulti))
     {
         return true;
     }
     geoVectMulti.L1AndL2P1 = this.VectorMultiple(pt1, pt2, this[3]);
     geoVectMulti.L1AndL2P2 = this.VectorMultiple(pt1, pt2, this[0]);
     geoVectMulti.L2AndL1P1 = this.VectorMultiple(this[3], this[0], pt1);
     geoVectMulti.L2AndL1P2 = this.VectorMultiple(this[3], this[0], pt2);
     return this.IsIntersectLine(geoVectMulti);
 }
Beispiel #2
0
 public bool IsIntersectLine(GeoVectorMultiple geoVectMulti)
 {
     return (((geoVectMulti.L1AndL2P1 * geoVectMulti.L1AndL2P2) < 0.0) && ((geoVectMulti.L2AndL1P1 * geoVectMulti.L2AndL1P2) < 0.0));
 }