Core.LineSegment.Intersects C# (CSharp) Method

Intersects() public method

public Intersects ( LineSegment other, IntersectionCheckOptions option ) : bool
other LineSegment
option IntersectionCheckOptions
return bool
        public bool Intersects(LineSegment other, IntersectionCheckOptions option)
        {
            return projectionIntersectionCheck(other, option) && signedTriangleSquareCheck(other, option);
        }

Usage Example

Exemplo n.º 1
0
        public bool IntersectsWithLineSegment(LineSegment segment, IntersectionCheckOptions option)
        {
            bool result = false;

            for (int i = 1; i < Count && !result; i++)
            {
                result = segment.Intersects(new LineSegment(this[i - 1], this[i]), option);
            }
            return(result);
        }