Esempio n. 1
0
        /// <summary>Returns intersection between a line segment and a line.</summary>
        public override Intersection GetIntersection(WLine b)
        {
            if (this.Parallel(b))
            {
                if (b.Overlaps(this.A))
                {
                    return(new Intersection(this));
                }
                return(Intersection.NONE);
            }

            WLine        thisLine = this.ToWLine();
            Intersection potentialIntersection = thisLine.GetIntersection(b);

            if (this.Overlaps(potentialIntersection.Point))
            {
                return(potentialIntersection);
            }

            return(Intersection.NONE);
        }
Esempio n. 2
0
 /// <summary>Returns true if this point overlaps any part of the <pararef name='line'/>.</summary>
 public bool Overlaps(WLine line)
 {
     return(line.Overlaps(this));
 }