Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Math
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Math/IntRect.h |
| Include | #include "Math/IntRect.h" |
Syntax
template<typename InIntType>
struct TIntRect
Remarks
Structure for integer rectangles in 2-d space.
Variables
| Type | Name | Description | |
|---|---|---|---|
| union UE::Math::TIntRect::@451 | @452 | ||
| IntPointType | Max | Holds the last pixel line/row (like in Win32 RECT). | |
| IntPointType | Min | Holds the first pixel line/row (like in Win32 RECT). | |
| IntPointType[2] | MinMax |
Constructors
| Type | Name | Description | |
|---|---|---|---|
TIntRect () |
Constructor | ||
| Converts to another int type. Checks that the cast will succeed. | |||
TIntRect
(
IntPointType InMin, |
Constructor | ||
| Constructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| IntType | Area () |
Calculates the area of this rectangle. | |
| TIntRect | Creates a rectangle from the bottom part of this rectangle. | ||
| void | Clip a rectangle using the bounds of another rectangle. | ||
| bool | Contains
(
IntPointType P |
Test whether this rectangle contains a point. | |
| TIntRect | DivideAndRoundUp
(
TIntRect lhs, |
||
| TIntRect | DivideAndRoundUp
(
TIntRect lhs, |
Divides a rectangle and rounds up to the nearest integer. | |
| void | GetCenterAndExtents
(
IntPointType& OutCenter, |
Gets the Center and Extents of this rectangle. | |
| IntType | Height () |
Gets the Height of the rectangle. | |
| void |
Include
(
IntPointType Point |
Adds to this rectangle to include a given point. | |
| void | InflateRect
(
IntType Amount |
Inflates or deflates the rectangle. | |
| TIntRect | Inner
(
IntPointType Shrink |
Gets a new rectangle from the inner of this one. | |
| bool | Returns true if the two rects have any overlap. | ||
| bool | IsEmpty () |
Returns true if the rectangle is 0 x 0. | |
| int32 | Num () |
Gets number of points in the Rectangle. | |
| TIntRect | Creates a rectangle from the right hand side of this rectangle. | ||
| TIntRect | Scale
(
double Fraction |
Scales a rectangle using a floating point number. | |
| IntPointType | Size () |
Gets the distance from one corner of the rectangle to the other. | |
| FString | ToString () |
Get a textual representation of this rectangle. | |
| void | Combines the two rectanges. | ||
| IntType | Width () |
Gets the width of the rectangle. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| TIntRect | Gets the result of subtracting a rectangle from this one. | ||
| TIntRect | operator-
(
const IntPointType& Point |
Gets the result of subtracting a point from this rectangle. | |
| bool | operator!=
(
const TIntRect& Other |
Compares Rectangles for inequality. | |
| TIntRect & | operator()
(
int32 PointIndex |
Gets a specific point in this rectangle. | |
| const TIntRect & | operator()
(
int32 PointIndex |
Gets a specific point in this rectangle. | |
| TIntRect | Gets the result of scaling on this rectangle. | ||
| TIntRect & | operator*=
(
IntType Scale |
Applies scaling to this rectangle. | |
| TIntRect | operator/
(
const IntPointType& Point |
Gets the result of dividing a point with this rectangle. | |
| TIntRect | Gets the result of division on this rectangle. | ||
| TIntRect | Gets the result of adding two rectangles together. | ||
| TIntRect | operator+
(
const IntPointType& Point |
Gets the result of adding a point to this rectangle. | |
| TIntRect & | operator+=
(
const IntPointType& Point |
Adds a point to this rectangle. | |
| TIntRect & | |||
| TIntRect & | operator-=
(
const IntPointType& Point |
Subtracts a point from this rectangle. | |
| bool | operator==
(
const TIntRect& Other |
Compares Rectangles for equality. |
Typedefs
| Name | Description |
|---|---|
| IntPointType | |
| IntType |