예제 #1
0
 /// <summary>
 ///   Checks if the passed line segments intersect and computes the intersection point if they do
 /// </summary>
 /// <param name="lineSegmentA"> </param>
 /// <param name="lineSegmentB"> </param>
 /// <param name="intersectionPoint"> Intersection point between the two passed line segments </param>
 /// <returns> Returns true if line segments intersect, otherwise false </returns>
 public static bool Intersect(
     LineSegment2I lineSegmentA, LineSegment2I lineSegmentB, out Vector2F intersectionPoint)
 {
     return(Intersect(
                lineSegmentA.PointA,
                lineSegmentA.PointB,
                lineSegmentB.PointA,
                lineSegmentB.PointB,
                out intersectionPoint));
 }
예제 #2
0
        /// <summary>
        ///   Checks if the passed line segments intersect
        /// </summary>
        /// <param name="lineSegmentA"> </param>
        /// <param name="lineSegmentB"> </param>
        /// <returns> Returns true if line segments intersect, otherwise false </returns>
        public static bool Intersect(LineSegment2I lineSegmentA, LineSegment2I lineSegmentB)
        {
            // TODO: This can be made faster because we don't need to compute the intersection point
            Vector2F intersectionPoint;

            return(Intersect(
                       lineSegmentA.PointA,
                       lineSegmentA.PointB,
                       lineSegmentB.PointA,
                       lineSegmentB.PointB,
                       out intersectionPoint));
        }
예제 #3
0
 /// <summary>
 ///   Checks if the passed line segments intersect
 /// </summary>
 /// <param name="lineSegmentA"> </param>
 /// <param name="lineSegmentB"> </param>
 /// <returns> Returns true if line segments intersect, otherwise false </returns>
 public static bool Intersect(LineSegment2I lineSegmentA, LineSegment2I lineSegmentB)
 {
     // TODO: This can be made faster because we don't need to compute the intersection point
     Vector2F intersectionPoint;
     return Intersect(
         lineSegmentA.PointA,
         lineSegmentA.PointB,
         lineSegmentB.PointA,
         lineSegmentB.PointB,
         out intersectionPoint);
 }
예제 #4
0
 /// <summary>
 ///   Checks if the passed line segments intersect and computes the intersection point if they do
 /// </summary>
 /// <param name="lineSegmentA"> </param>
 /// <param name="lineSegmentB"> </param>
 /// <param name="intersectionPoint"> Intersection point between the two passed line segments </param>
 /// <returns> Returns true if line segments intersect, otherwise false </returns>
 public static bool Intersect(
     LineSegment2I lineSegmentA, LineSegment2I lineSegmentB, out Vector2F intersectionPoint)
 {
     return Intersect(
         lineSegmentA.PointA,
         lineSegmentA.PointB,
         lineSegmentB.PointA,
         lineSegmentB.PointB,
         out intersectionPoint);
 }