C# Class Project290.Mathematics.RectangleLineClipper

Used for clipping lines with a rectangle.
Afficher le fichier Open project: scastle/Solitude

Méthodes publiques

Méthode 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

Méthode Description
CheckLine ( Vector2 &pointA, Vector2 &pointB, Rectangle &clippingRectangle ) : bool

Checks the line.

Method Details

ClipLine() public static méthode

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
Résultat bool