C# Class Sharpex2D.Math.Rectangle

显示文件 Open project: ThuCommix/Sharpex2D Class Usage Examples

Public Methods

Method Description
Contains ( Rectangle value ) : bool

Determines whether this instance contains the specified rectangle.

Contains ( Vector2 vector ) : bool

Determines whether this instance contains the specified vector.

Intersect ( Rectangle rectangle ) : Rectangle

Intersects the specified rectangle.

Intersects ( Rectangle rectangle ) : bool

Intersectses the specified rectangle.

Rectangle ( Vector2 a, Vector2 b ) : System

Initializes a new instance of the Rectangle struct.

Rectangle ( float x, float y, float width, float height ) : System

Initializes a new instance of the Rectangle struct.

ToString ( ) : string

Converts the Rectangle to a string.

operator ( ) : Rectangle

Implements the operator *.

Method Details

Contains() public method

Determines whether this instance contains the specified rectangle.
public Contains ( Rectangle value ) : bool
value Rectangle The value.
return bool

Contains() public method

Determines whether this instance contains the specified vector.
public Contains ( Vector2 vector ) : bool
vector Vector2 The vector.
return bool

Intersect() public method

Intersects the specified rectangle.
public Intersect ( Rectangle rectangle ) : Rectangle
rectangle Rectangle The rectangle.
return Rectangle

Intersects() public method

Intersectses the specified rectangle.
public Intersects ( Rectangle rectangle ) : bool
rectangle Rectangle The rectangle.
return bool

Rectangle() public method

Initializes a new instance of the Rectangle struct.
public Rectangle ( Vector2 a, Vector2 b ) : System
a Vector2 The first vector.
b Vector2 The second vector.
return System

Rectangle() public method

Initializes a new instance of the Rectangle struct.
public Rectangle ( float x, float y, float width, float height ) : System
x float The x.
y float The y.
width float The width.
height float The height.
return System

ToString() public method

Converts the Rectangle to a string.
public ToString ( ) : string
return string

operator() public static method

Implements the operator *.
public static operator ( ) : Rectangle
return Rectangle