Пример #1
0
        public bool IsCrossedByLine(Line line, out CrossPoint crossPoint)
        {
            crossPoint = null;
            if (IsParallelWithLine(line))
            {
                return(false);
            }

            crossPoint = GetCrossPointWithLine(line);

            return(IsCrossPointInLine(crossPoint) && line.IsCrossPointInLine(crossPoint));
        }
Пример #2
0
 bool IsCrossPointInLineOY(CrossPoint crossPoint)
 {
     return(crossPoint.Y <= _pointStart.Y && crossPoint.Y >= _pointEnd.Y || crossPoint.Y >= _pointStart.Y && crossPoint.Y <= _pointEnd.Y);
 }
Пример #3
0
 bool IsCrossPointInLineOX(CrossPoint crossPoint)
 {
     return(crossPoint.X <= _pointStart.X && crossPoint.X >= _pointEnd.X || crossPoint.X >= _pointStart.X && crossPoint.X <= _pointEnd.X);
 }
Пример #4
0
 bool IsCrossPointInLine(CrossPoint crossPoint)
 {
     return(IsCrossPointInLineOX(crossPoint) && IsCrossPointInLineOY(crossPoint));
 }