C# Class Project290.Mathematics.RectangleLineClipper

Used for clipping lines with a rectangle.
Show file Open project: scastle/Solitude

Public Methods

Method Description
ClipLine ( Vector2 &pointA, Vector2 &pointB, Rectangle &clippingRectangle ) : bool

Clips the specified line. Returns false if this does not lie within the specified rectangle. Otherwise, modifies the points.

Private Methods

Method Description
CheckLine ( Vector2 &pointA, Vector2 &pointB, Rectangle &clippingRectangle ) : bool

Checks the line.

Method Details

ClipLine() public static method

Clips the specified line. Returns false if this does not lie within the specified rectangle. Otherwise, modifies the points.
public static ClipLine ( Vector2 &pointA, Vector2 &pointB, Rectangle &clippingRectangle ) : bool
pointA Vector2 The point A.
pointB Vector2 The point B.
clippingRectangle Microsoft.Xna.Framework.Rectangle
return bool