MuGameFramework  1.0
MuGameFramework is a 2D game framework built upon C# and SFML
 All Classes Namespaces Files Functions Variables Enumerations Properties
MuGameFramework.Components.Rectangle Struct Reference

Represents a Rectangle on a 2D plane on the screen More...

Public Member Functions

 Rectangle (int x, int y, int width, int height)
 Create an instance of Rectangle
override bool Equals (object obj)
 Compare a rectangle with this for equality
override int GetHashCode ()
 Get the hash code for this object
override string ToString ()
 Print out the values of a rectangle as a string
bool Contains (Point point)
 Check if a point is contained inside this rectangle
bool Intersects (Rectangle rect)
 Check if a rectangle intersects this rectangle
void Inflate (int changeWidth, int changeHeight)
 Inflate/Deflate the box's Width and Height

Static Public Member Functions

static implicit operator string (Rectangle value)
 Print out the values of a rectangle as a string
static bool operator== (Rectangle a, Rectangle b)
 Compare two Rectangles for equality
static bool operator!= (Rectangle a, Rectangle b)
 Compare two Rectangles for inequality
static bool Contains (Rectangle rect, Point point)
 Check if a point is contained inside this rectangle
static bool Intersects (Rectangle rect1, Rectangle rect2)
 Check if two Rectangles are intersecting

Public Attributes

Point Position
 Position of this Rectangle object
int Width
 Width of this Vector2 object
int Height
 Height of this Vector2 object

Static Public Attributes

static readonly Rectangle Zero = new Rectangle(0, 0, 0, 0)
 Returns a Vector2 with the value of Zero

Properties

int X [get, set]
 X coordinate of this Rectangle object
int Y [get, set]
 Y coordinate of this Rectangle object
int Top [get, set]
 Top value of this Rectangle
int Left [get, set]
 Left value of this Rectangle
int Bottom [get, set]
 Bottom value of this Rectangle
int Right [get, set]
 Right value of this Rectangle
Vector2 Center [get]
 Center of the Rectangle

Detailed Description

Represents a Rectangle on a 2D plane on the screen

Constructor & Destructor Documentation

MuGameFramework.Components.Rectangle.Rectangle ( int  x,
int  y,
int  width,
int  height 
)

Create an instance of Rectangle

Member Function Documentation

bool MuGameFramework.Components.Rectangle.Contains ( Point  point)

Check if a point is contained inside this rectangle

Parameters
pointPoint to check
Returns
Result of check
static bool MuGameFramework.Components.Rectangle.Contains ( Rectangle  rect,
Point  point 
)
static

Check if a point is contained inside this rectangle

Parameters
rectRectangle to check containment
pointPoint to check
Returns
Result of check
override bool MuGameFramework.Components.Rectangle.Equals ( object  obj)

Compare a rectangle with this for equality

Parameters
objRectangle to compare
Returns
Result of comparison
override int MuGameFramework.Components.Rectangle.GetHashCode ( )

Get the hash code for this object

Returns
The hash code for this object
void MuGameFramework.Components.Rectangle.Inflate ( int  changeWidth,
int  changeHeight 
)

Inflate/Deflate the box's Width and Height

Parameters
changeWidthAmount fo change needed to Width
changeHeightAmount fo change needed to Height
bool MuGameFramework.Components.Rectangle.Intersects ( Rectangle  rect)

Check if a rectangle intersects this rectangle

Parameters
rectRectangle to check intersection
Returns
Result of check
static bool MuGameFramework.Components.Rectangle.Intersects ( Rectangle  rect1,
Rectangle  rect2 
)
static

Check if two Rectangles are intersecting

Parameters
rect11st Rectangle to check intersection
rect22nd Rectangle to check intersection
Returns
Result of check
static implicit MuGameFramework.Components.Rectangle.operator string ( Rectangle  value)
static

Print out the values of a rectangle as a string

Parameters
valueRectangle to print out
Returns
String of thus Rectangle
static bool MuGameFramework.Components.Rectangle.operator!= ( Rectangle  a,
Rectangle  b 
)
static

Compare two Rectangles for inequality

Parameters
aRectangle A to check
bRectangle B to check
Returns
Result of comparison
static bool MuGameFramework.Components.Rectangle.operator== ( Rectangle  a,
Rectangle  b 
)
static

Compare two Rectangles for equality

Parameters
aRectangle A to check
bRectangle B to check
Returns
Result of comparison
override string MuGameFramework.Components.Rectangle.ToString ( )

Print out the values of a rectangle as a string

Returns
String of thus Rectangle

Member Data Documentation

int MuGameFramework.Components.Rectangle.Height

Height of this Vector2 object

Point MuGameFramework.Components.Rectangle.Position

Position of this Rectangle object

int MuGameFramework.Components.Rectangle.Width

Width of this Vector2 object

readonly Rectangle MuGameFramework.Components.Rectangle.Zero = new Rectangle(0, 0, 0, 0)
static

Returns a Vector2 with the value of Zero

Property Documentation

int MuGameFramework.Components.Rectangle.Bottom
getset

Bottom value of this Rectangle

Vector2 MuGameFramework.Components.Rectangle.Center
get

Center of the Rectangle

int MuGameFramework.Components.Rectangle.Left
getset

Left value of this Rectangle

int MuGameFramework.Components.Rectangle.Right
getset

Right value of this Rectangle

int MuGameFramework.Components.Rectangle.Top
getset

Top value of this Rectangle

int MuGameFramework.Components.Rectangle.X
getset

X coordinate of this Rectangle object

int MuGameFramework.Components.Rectangle.Y
getset

Y coordinate of this Rectangle object


The documentation for this struct was generated from the following file: