C# Class PrinceGame.RectangleExtensions

Mostra file Open project: salvadorc17/Prince-Monogame Class Usage Examples

Public Methods

Method Description
GetBottomCenter ( Rectangle rect ) : Vector2

Gets the position of the center of the bottom edge of the rectangle.

GetIntersectionDepth ( Rectangle rectA, Rectangle rectB ) : Vector2

Calculates the signed depth of intersection between two rectangles.

Private Methods

Method Description
RectangleExtensions ( ) : System

Method Details

GetBottomCenter() public static method

Gets the position of the center of the bottom edge of the rectangle.
public static GetBottomCenter ( Rectangle rect ) : Vector2
rect Microsoft.Xna.Framework.Rectangle
return Vector2

GetIntersectionDepth() public static method

Calculates the signed depth of intersection between two rectangles.
public static GetIntersectionDepth ( Rectangle rectA, Rectangle rectB ) : Vector2
rectA Microsoft.Xna.Framework.Rectangle
rectB Microsoft.Xna.Framework.Rectangle
return Vector2