Ejemplo n.º 1
0
        /// <summary>
        /// 两条线段的交点。
        /// </summary>
        /// <param name="lineAxy1"></param>
        /// <param name="lineAxy2"></param>
        /// <param name="lineBxy1"></param>
        /// <param name="lineBxy2"></param>
        /// <returns></returns>
        public static XYZ GetIntersectionPt(XY lineAxy1, XY lineAxy2, XY lineBxy1, XY lineBxy2)
        {
            XY xy = XyUtil.GetIntersectionPtOfTwoLineSegment(lineAxy1, lineAxy2, lineBxy1, lineBxy2);

            if (xy == null)
            {
                return(null);
            }
            return(new XYZ(xy.X, xy.Y));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 计算两线段的交点。如果不相交,则返回null。
 /// </summary>
 /// <param name="other">另一条线段</param>
 /// <returns></returns>
 public override XY GetIntersectionCoord(TwoDLineSegment <XY> other)
 {
     return(XyUtil.GetIntersectionPtOfTwoLineSegment(this.CoordA, this.CoordB, other.CoordA, other.CoordB));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 计算两线段的交点。如果不相交,则返回null。
 /// </summary>
 /// <param name="other">另一条线段</param>
 /// <returns></returns>
 public virtual TCoord GetIntersectionCoord(TwoDLineSegment <TCoord> other)
 {
     return((TCoord)XyUtil.GetIntersectionPtOfTwoLineSegment(this.CoordA, this.CoordB, other.CoordA, other.CoordB));
     // return default(TCoord);
 }