예제 #1
0
        //public double DistanceTo(CEdge querycedge, bool blnCheckIntersect = true)
        //{
        //if (blnCheckIntersect == true)
        //{
        //    if (this.IsIntersectWith(querycedge))
        //    {
        //        return 0;
        //    }
        //}

        //var dis1 = this.FrCpt.DistanceTo(querycedge);
        //var dis2 = this.ToCpt.DistanceTo(querycedge);
        //var dis3 = querycedge.FrCpt.DistanceTo(this);
        //var dis4 = querycedge.ToCpt.DistanceTo(this);

        //return Math.Min(dis1, Math.Min(dis2, Math.Min(dis3, dis4)));
        //}



        public CIntersection IntersectWith(CEdge pcedge)
        {
            var pIntersection = new CIntersection(this, pcedge);

            pIntersection.DetectIntersection();
            return(pIntersection);
        }
예제 #2
0
        public bool IsIntersectWith(CEdge pcedge,
                                    bool blnTouchBothEnds = false, bool blnTouchEndEdge = false, bool blnOverlap = false)
        {
            var pIntersection = new CIntersection(this, pcedge);

            pIntersection.DetectIntersection();

            return(pIntersection.JudgeIntersect(blnTouchBothEnds, blnTouchEndEdge, blnOverlap));
        }
예제 #3
0
        /// <summary>
        /// It turns out that we do not really need this function
        /// </summary>
        /// <param name="pcedge"></param>
        /// <returns></returns>
        public bool IsTouchWith(CEdge pcedge)
        {
            var pIntersection = new CIntersection(this, pcedge);

            return(pIntersection.IsTouch());
        }