CryEngine.Rect

Rectangle representation. More...

Public Member Functions

Rect (float x, float y, float width, float height)
Creates a new rectangle More...
bool Contains (Point v)
Checks if point is inside this Rect. More...
bool Contains (float _x, float _y)
Checks if coordinates are inside this Rect. More...
Rect Pad (Rect s)
Returns new rectangle, modified by the delta of 's'. More...
override string ToString ()
Returns a string that represents the current Rect. More...

Static Public Member Functions

static Rect operator& (Rect r, Rect s)
Returns new rectangle, which includes 'r' and 's'. More...

Public Attributes

float x
float y
float w
float h

Properties

float Width [get, set]
The width of the rectangle. More...
float Height [get, set]
The height of the rectangle. More...
float Size [get]
The square size of the rectangle. More...

Detailed Description

Rectangle representation.

Constructor & Destructor Documentation

◆ Rect()

CryEngine.Rect.Rect ( float x,
float y,
float width,
float height
)
inline

Creates a new rectangle

Parameters
xX.
yY.
widthW.
heightH.

Member Function Documentation

◆ Contains() [1/2]

bool CryEngine.Rect.Contains ( Point v)
inline

Checks if point is inside this Rect.

Parameters
vThe point to be checked.

◆ Contains() [2/2]

bool CryEngine.Rect.Contains ( float _x,
float _y
)
inline

Checks if coordinates are inside this Rect.

Parameters
_xThe x coordinate.
_yThe y coordinate.

◆ operator&()

static Rect CryEngine.Rect.operator & ( Rect r,
Rect s
)
inline
static

Returns new rectangle, which includes 'r' and 's'.

Parameters
rFirst Rect to be included.
sSecond Rect to be included.

◆ Pad()

Rect CryEngine.Rect.Pad ( Rect s)
inline

Returns new rectangle, modified by the delta of 's'.

Parameters
sThe rect to be used for delta movement.

◆ ToString()

override string CryEngine.Rect.ToString ( )
inline

Returns a string that represents the current Rect.

Returns
A string that represents the current Rect.

Member Data Documentation

◆ h

float CryEngine.Rect.h

◆ w

float CryEngine.Rect.w

◆ x

float CryEngine.Rect.x

◆ y

float CryEngine.Rect.y

Property Documentation

◆ Height

float CryEngine.Rect.Height
get
set

The height of the rectangle.

The height.

◆ Size

float CryEngine.Rect.Size
get

The square size of the rectangle.

The size.

◆ Width

float CryEngine.Rect.Width
get
set

The width of the rectangle.

The width.