C# Class GameMath.LineIntersection

Show file Open project: npruehs/game-math

Public Methods

Method Description
Intersects ( this line, CircleF circle ) : bool

Checks whether the specified line intersects the passed circle.

Intersects ( this line, CircleF circle, Vector2F &first, Vector2F &second ) : bool

Checks whether the specified line intersects the passed circle.

See http://devmag.org.za/2009/04/17/basic-collision-detection-in-2d-part-2/ for details.

Intersects ( this first, LineSegment2F second ) : bool

Checks whether the specified line segment intersects the passed one.

See http://jeffe.cs.illinois.edu/teaching/373/notes/x06-sweepline.pdf for details.

Intersects ( this first, LineSegment2F second, Vector2F &intersectionPoint ) : bool

Checks whether the specified line segment intersects the passed one.

See http://www.wyrmtale.com/blog/2013/115/2d-line-intersection-in-c for details.

Method Details

Intersects() public static method

Checks whether the specified line intersects the passed circle.
public static Intersects ( this line, CircleF circle ) : bool
line this /// Line to check. ///
circle CircleF /// Circle to check. ///
return bool

Intersects() public static method

Checks whether the specified line intersects the passed circle.
See http://devmag.org.za/2009/04/17/basic-collision-detection-in-2d-part-2/ for details.
public static Intersects ( this line, CircleF circle, Vector2F &first, Vector2F &second ) : bool
line this /// Line to check. ///
circle CircleF /// Circle to check. ///
first Vector2F /// First intersection point, if found. ///
second Vector2F /// Second intersection point, if found. ///
return bool

Intersects() public static method

Checks whether the specified line segment intersects the passed one.
See http://jeffe.cs.illinois.edu/teaching/373/notes/x06-sweepline.pdf for details.
public static Intersects ( this first, LineSegment2F second ) : bool
first this Line segment to check.
second LineSegment2F Line segment to check.
return bool

Intersects() public static method

Checks whether the specified line segment intersects the passed one.
See http://www.wyrmtale.com/blog/2013/115/2d-line-intersection-in-c for details.
public static Intersects ( this first, LineSegment2F second, Vector2F &intersectionPoint ) : bool
first this Line segment to check.
second LineSegment2F Line segment to check.
intersectionPoint Vector2F Intersection point, if found.
return bool