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