Beispiel #1
0
 /// <summary>
 /// Get all intersections between a line segment and an AABB. 
 /// </summary>
 /// <param name="point1">The first point of the line segment to test</param>
 /// <param name="point2">The second point of the line segment to test.</param>
 /// <param name="aabb">The AABB that is used for testing intersection.</param>
 /// <param name="intersectionPoints">An list of intersection points. Any intersection points found will be added to this list.</param>
 public static void LineSegmentAABBIntersect(ref Vector2 point1, ref Vector2 point2, AABB aabb, ref List<Vector2> intersectionPoints)
 {
     LineSegmentVerticesIntersect(ref point1, ref point2, aabb.GetVertices(), ref intersectionPoints);
 }
Beispiel #2
0
 /// <summary>
 /// Get all intersections between a line segment and an AABB.
 /// </summary>
 /// <param name="point1">The first point of the line segment to test</param>
 /// <param name="point2">The second point of the line segment to test.</param>
 /// <param name="aabb">The AABB that is used for testing intersection.</param>
 /// <param name="intersectionPoints">An list of intersection points. Any intersection points found will be added to this list.</param>
 public static void LineSegmentAABBIntersect(ref Vector2 point1, ref Vector2 point2, AABB aabb, ref List <Vector2> intersectionPoints)
 {
     LineSegmentVerticesIntersect(ref point1, ref point2, aabb.GetVertices(), ref intersectionPoints);
 }
Beispiel #3
0
 /// <summary>
 /// Get all intersections between a line segment and an AABB.
 /// </summary>
 /// <param name="p1">The first point of the line segment to test</param>
 /// <param name="p2">The second point of the line segment to test.</param>
 /// <param name="aabb">The AABB that is used for testing intersection.</param>
 /// <param name="points">An list of intersection points. Any intersection points found will be added to this list.</param>
 public static void LineSegmentAABBIntersect(ref Vector2 p1, ref Vector2 p2, AABB aabb, ref List <Vector2> points)
 {
     LineSegmentVerticiesIntersect(ref p1, ref p2, aabb.GetVertices(), ref points);
 }