Space Engineers
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
VRageMath.Rectangle Struct Reference

Defines a rectangle. More...

Inheritance diagram for VRageMath.Rectangle:

Public Member Functions

 Rectangle (int x, int y, int width, int height)
 Initializes a new instance of Rectangle. More...
 
void Offset (Point amount)
 Changes the position of the Rectangle. More...
 
void Offset (int offsetX, int offsetY)
 Changes the position of the Rectangle. More...
 
void Inflate (int horizontalAmount, int verticalAmount)
 Pushes the edges of the Rectangle out by the horizontal and vertical values specified. More...
 
bool Contains (int x, int y)
 Determines whether this Rectangle contains a specified point represented by its x- and y-coordinates. More...
 
bool Contains (Point value)
 Determines whether this Rectangle contains a specified Point. More...
 
void Contains (ref Point value, out bool result)
 Determines whether this Rectangle contains a specified Point. More...
 
bool Contains (Rectangle value)
 Determines whether this Rectangle entirely contains a specified Rectangle. More...
 
void Contains (ref Rectangle value, out bool result)
 Determines whether this Rectangle entirely contains a specified Rectangle. More...
 
bool Intersects (Rectangle value)
 Determines whether a specified Rectangle intersects with this Rectangle. More...
 
void Intersects (ref Rectangle value, out bool result)
 Determines whether a specified Rectangle intersects with this Rectangle. More...
 
bool Equals (Rectangle other)
 Determines whether the specified Object is equal to the Rectangle. More...
 
override bool Equals (object obj)
 Returns a value that indicates whether the current instance is equal to a specified object. More...
 
override string ToString ()
 Retrieves a string representation of the current object. More...
 
override int GetHashCode ()
 Gets the hash code for this object. More...
 

Static Public Member Functions

static Rectangle ()
 
static bool operator== (Rectangle a, Rectangle b)
 Compares two rectangles for equality. More...
 
static bool operator!= (Rectangle a, Rectangle b)
 Compares two rectangles for inequality. More...
 
static Rectangle Intersect (Rectangle value1, Rectangle value2)
 Creates a Rectangle defining the area where one rectangle overlaps with another rectangle. More...
 
static void Intersect (ref Rectangle value1, ref Rectangle value2, out Rectangle result)
 Creates a Rectangle defining the area where one rectangle overlaps with another rectangle. More...
 
static Rectangle Union (Rectangle value1, Rectangle value2)
 Creates a new Rectangle that exactly contains two other rectangles. More...
 
static void Union (ref Rectangle value1, ref Rectangle value2, out Rectangle result)
 Creates a new Rectangle that exactly contains two other rectangles. More...
 

Public Attributes

int X
 Specifies the x-coordinate of the rectangle. More...
 
int Y
 Specifies the y-coordinate of the rectangle. More...
 
int Width
 Specifies the width of the rectangle. More...
 
int Height
 Specifies the height of the rectangle. More...
 

Properties

int Left [get]
 Returns the x-coordinate of the left side of the rectangle. More...
 
int Right [get]
 Returns the x-coordinate of the right side of the rectangle. More...
 
int Top [get]
 Returns the y-coordinate of the top of the rectangle. More...
 
int Bottom [get]
 Returns the y-coordinate of the bottom of the rectangle. More...
 
Point Location [get, set]
 Gets or sets the upper-left value of the Rectangle. More...
 
Point Center [get]
 Gets the Point that specifies the center of the rectangle. More...
 

Detailed Description

Defines a rectangle.

Definition at line 10 of file Rectangle.cs.

Constructor & Destructor Documentation

static VRageMath.Rectangle.Rectangle ( )
inlinestatic

Definition at line 100 of file Rectangle.cs.

VRageMath.Rectangle.Rectangle ( int  x,
int  y,
int  width,
int  height 
)
inline

Initializes a new instance of Rectangle.

Parameters
xThe x-coordinate of the rectangle.
yThe y-coordinate of the rectangle.
widthWidth of the rectangle.
heightHeight of the rectangle.

Definition at line 108 of file Rectangle.cs.

Member Function Documentation

bool VRageMath.Rectangle.Contains ( int  x,
int  y 
)
inline

Determines whether this Rectangle contains a specified point represented by its x- and y-coordinates.

Parameters
xThe x-coordinate of the specified point.
yThe y-coordinate of the specified point.

Definition at line 176 of file Rectangle.cs.

bool VRageMath.Rectangle.Contains ( Point  value)
inline

Determines whether this Rectangle contains a specified Point.

Parameters
valueThe Point to evaluate.

Definition at line 188 of file Rectangle.cs.

void VRageMath.Rectangle.Contains ( ref Point  value,
out bool  result 
)
inline

Determines whether this Rectangle contains a specified Point.

Parameters
valueThe Point to evaluate.
result[OutAttribute] true if the specified Point is contained within this Rectangle; false otherwise.

Definition at line 200 of file Rectangle.cs.

bool VRageMath.Rectangle.Contains ( Rectangle  value)
inline

Determines whether this Rectangle entirely contains a specified Rectangle.

Parameters
valueThe Rectangle to evaluate.

Definition at line 209 of file Rectangle.cs.

void VRageMath.Rectangle.Contains ( ref Rectangle  value,
out bool  result 
)
inline

Determines whether this Rectangle entirely contains a specified Rectangle.

Parameters
valueThe Rectangle to evaluate.
result[OutAttribute] On exit, is true if this Rectangle entirely contains the specified Rectangle, or false if not.

Definition at line 221 of file Rectangle.cs.

bool VRageMath.Rectangle.Equals ( Rectangle  other)
inline

Determines whether the specified Object is equal to the Rectangle.

Parameters
otherThe Object to compare with the current Rectangle.

Definition at line 355 of file Rectangle.cs.

override bool VRageMath.Rectangle.Equals ( object  obj)
inline

Returns a value that indicates whether the current instance is equal to a specified object.

Parameters
objObject to make the comparison with.

Definition at line 367 of file Rectangle.cs.

override int VRageMath.Rectangle.GetHashCode ( )
inline

Gets the hash code for this object.

Definition at line 387 of file Rectangle.cs.

void VRageMath.Rectangle.Inflate ( int  horizontalAmount,
int  verticalAmount 
)
inline

Pushes the edges of the Rectangle out by the horizontal and vertical values specified.

Parameters
horizontalAmountValue to push the sides out by.
verticalAmountValue to push the top and bottom out by.

Definition at line 164 of file Rectangle.cs.

static Rectangle VRageMath.Rectangle.Intersect ( Rectangle  value1,
Rectangle  value2 
)
inlinestatic

Creates a Rectangle defining the area where one rectangle overlaps with another rectangle.

Parameters
value1The first Rectangle to compare.
value2The second Rectangle to compare.

Definition at line 251 of file Rectangle.cs.

static void VRageMath.Rectangle.Intersect ( ref Rectangle  value1,
ref Rectangle  value2,
out Rectangle  result 
)
inlinestatic

Creates a Rectangle defining the area where one rectangle overlaps with another rectangle.

Parameters
value1The first Rectangle to compare.
value2The second Rectangle to compare.
result[OutAttribute] The area where the two first parameters overlap.

Definition at line 283 of file Rectangle.cs.

bool VRageMath.Rectangle.Intersects ( Rectangle  value)
inline

Determines whether a specified Rectangle intersects with this Rectangle.

Parameters
valueThe Rectangle to evaluate.

Definition at line 230 of file Rectangle.cs.

void VRageMath.Rectangle.Intersects ( ref Rectangle  value,
out bool  result 
)
inline

Determines whether a specified Rectangle intersects with this Rectangle.

Parameters
valueThe Rectangle to evaluate
result[OutAttribute] true if the specified Rectangle intersects with this one; false otherwise.

Definition at line 242 of file Rectangle.cs.

void VRageMath.Rectangle.Offset ( Point  amount)
inline

Changes the position of the Rectangle.

Parameters
amountThe values to adjust the position of the Rectangle by.

Definition at line 144 of file Rectangle.cs.

void VRageMath.Rectangle.Offset ( int  offsetX,
int  offsetY 
)
inline

Changes the position of the Rectangle.

Parameters
offsetXChange in the x-position.
offsetYChange in the y-position.

Definition at line 154 of file Rectangle.cs.

static bool VRageMath.Rectangle.operator!= ( Rectangle  a,
Rectangle  b 
)
inlinestatic

Compares two rectangles for inequality.

Parameters
aSource rectangle.
bSource rectangle.

Definition at line 132 of file Rectangle.cs.

static bool VRageMath.Rectangle.operator== ( Rectangle  a,
Rectangle  b 
)
inlinestatic

Compares two rectangles for equality.

Parameters
aSource rectangle.
bSource rectangle.

Definition at line 120 of file Rectangle.cs.

override string VRageMath.Rectangle.ToString ( )
inline

Retrieves a string representation of the current object.

Definition at line 378 of file Rectangle.cs.

static Rectangle VRageMath.Rectangle.Union ( Rectangle  value1,
Rectangle  value2 
)
inlinestatic

Creates a new Rectangle that exactly contains two other rectangles.

Parameters
value1The first Rectangle to contain.
value2The second Rectangle to contain.

Definition at line 313 of file Rectangle.cs.

static void VRageMath.Rectangle.Union ( ref Rectangle  value1,
ref Rectangle  value2,
out Rectangle  result 
)
inlinestatic

Creates a new Rectangle that exactly contains two other rectangles.

Parameters
value1The first Rectangle to contain.
value2The second Rectangle to contain.
result[OutAttribute] The Rectangle that must be the union of the first two rectangles.

Definition at line 335 of file Rectangle.cs.

Member Data Documentation

int VRageMath.Rectangle.Height

Specifies the height of the rectangle.

Definition at line 27 of file Rectangle.cs.

int VRageMath.Rectangle.Width

Specifies the width of the rectangle.

Definition at line 23 of file Rectangle.cs.

int VRageMath.Rectangle.X

Specifies the x-coordinate of the rectangle.

Definition at line 15 of file Rectangle.cs.

int VRageMath.Rectangle.Y

Specifies the y-coordinate of the rectangle.

Definition at line 19 of file Rectangle.cs.

Property Documentation

int VRageMath.Rectangle.Bottom
get

Returns the y-coordinate of the bottom of the rectangle.

Definition at line 66 of file Rectangle.cs.

Point VRageMath.Rectangle.Center
get

Gets the Point that specifies the center of the rectangle.

Definition at line 93 of file Rectangle.cs.

int VRageMath.Rectangle.Left
get

Returns the x-coordinate of the left side of the rectangle.

Definition at line 33 of file Rectangle.cs.

Point VRageMath.Rectangle.Location
getset

Gets or sets the upper-left value of the Rectangle.

Definition at line 77 of file Rectangle.cs.

int VRageMath.Rectangle.Right
get

Returns the x-coordinate of the right side of the rectangle.

Definition at line 44 of file Rectangle.cs.

int VRageMath.Rectangle.Top
get

Returns the y-coordinate of the top of the rectangle.

Definition at line 55 of file Rectangle.cs.


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