Structure for integer rectangles in 2-d space. 更多...
#include <IntRect.h>
Public 成员函数 | |
| int32 | Area () const |
| Calculates the area of this rectangle. 更多... | |
| FIntRect | Bottom (int32 InHeight) const |
| Creates a rectangle from the bottom part of this rectangle. 更多... | |
| void | Clip (const FIntRect &Other) |
| Clip a rectangle using the bounds of another rectangle. 更多... | |
| bool | Contains (FIntPoint Point) const |
| Test whether this rectangle contains a point. 更多... | |
| FIntRect () | |
| Constructor | |
| FIntRect (FIntPoint InMin, FIntPoint InMax) | |
| Constructor 更多... | |
| FIntRect (int32 X0, int32 Y0, int32 X1, int32 Y1) | |
| Constructor 更多... | |
| void | GetCenterAndExtents (FIntPoint &OutCenter, FIntPoint &OutExtent) const |
| Gets the Center and Extents of this rectangle. 更多... | |
| int32 | Height () const |
| Gets the Height of the rectangle. 更多... | |
| void | Include (FIntPoint Point) |
| Adds to this rectangle to include a given point. 更多... | |
| void | InflateRect (int32 Amount) |
| Inflates or deflates the rectangle. 更多... | |
| FIntRect | Inner (FIntPoint Shrink) const |
| Gets a new rectangle from the inner of this one. 更多... | |
| bool | IsEmpty () const |
| Returns true if the rectangle is 0 x 0. 更多... | |
| bool | operator!= (const FIntRect &Other) const |
| Compares Rectangles for inequality. 更多... | |
| FIntPoint & | operator() (int32 PointIndex) |
| Gets a specific point in this rectangle. 更多... | |
| const FIntPoint & | operator() (int32 PointIndex) const |
| Gets a specific point in this rectangle. 更多... | |
| FIntRect | operator* (int32 Scale) const |
| Gets the result of scaling on this rectangle. 更多... | |
| FIntRect & | operator*= (int32 Scale) |
| Applies scaling to this rectangle. 更多... | |
| FIntRect | operator+ (const FIntPoint &Point) const |
| Gets the result of adding a point to this rectangle. 更多... | |
| FIntRect | operator+ (const FIntRect &Other) const |
| Gets the result of adding two rectangles together. 更多... | |
| FIntRect & | operator+= (const FIntPoint &Point) |
| Adds a point to this rectangle. 更多... | |
| FIntRect | operator- (const FIntPoint &Point) const |
| Gets the result of subtracting a point from this rectangle. 更多... | |
| FIntRect | operator- (const FIntRect &Other) const |
| Gets the result of subtracting a rectangle from this one. 更多... | |
| FIntRect & | operator-= (const FIntPoint &Point) |
| Subtracts a point from this rectangle. 更多... | |
| FIntRect | operator/ (const FIntPoint &Point) const |
| Gets the result of dividing a point with this rectangle. 更多... | |
| FIntRect | operator/ (int32 Div) const |
| Gets the result of division on this rectangle. 更多... | |
| bool | operator== (const FIntRect &Other) const |
| Compares Rectangles for equality. 更多... | |
| FIntRect | Right (int32 InWidth) const |
| Creates a rectangle from the right hand side of this rectangle. 更多... | |
| FIntRect | Scale (float Fraction) const |
| Scales a rectangle using a floating point number. 更多... | |
| FIntPoint | Size () const |
| Gets the distance from one corner of the rectangle to the other. 更多... | |
| FString | ToString () const |
| Get a textual representation of this rectangle. 更多... | |
| void | Union (const FIntRect &Other) |
| Combines the two rectanges. | |
| int32 | Width () const |
| Gets the width of the rectangle. 更多... | |
静态 Public 成员函数 | |
| static FIntRect | DivideAndRoundUp (FIntRect lhs, int32 Div) |
| Divides a rectangle and rounds up to the nearest integer. 更多... | |
| static int32 | Num () |
| Gets number of points in the Rectangle. 更多... | |
Public 属性 | |
| FIntPoint | Max |
| Holds the last pixel line/row (like in Win32 RECT). | |
| FIntPoint | Min |
| Holds the first pixel line/row (like in Win32 RECT). | |
友元 | |
| FArchive & | operator<< (FArchive &Ar, FIntRect &Rect) |
| Serializes the Rectangle. 更多... | |
Structure for integer rectangles in 2-d space.
| FORCEINLINE FIntRect::FIntRect | ( | int32 | X0, |
| int32 | Y0, | ||
| int32 | X1, | ||
| int32 | Y1 | ||
| ) |
Constructor
| X0 | Minimum X coordinate. |
| Y0 | Minimum Y coordinate. |
| X1 | Maximum X coordinate. |
| Y1 | Maximum Y coordinate. |
Constructor
| InMin | Minimum Point |
| InMax | Maximum Point |
| FORCEINLINE int32 FIntRect::Area | ( | ) | const |
Calculates the area of this rectangle.
| FORCEINLINE FIntRect FIntRect::Bottom | ( | int32 | InHeight | ) | const |
Creates a rectangle from the bottom part of this rectangle.
| InHeight | Height of the new rectangle (<= rectangles original height). |
| FORCEINLINE void FIntRect::Clip | ( | const FIntRect & | Other | ) |
Clip a rectangle using the bounds of another rectangle.
| Other | The other rectangle to clip against. |
| FORCEINLINE bool FIntRect::Contains | ( | FIntPoint | Point | ) | const |
Test whether this rectangle contains a point.
| Point | The point to test against. |
Divides a rectangle and rounds up to the nearest integer.
| lhs | The Rectangle to divide. |
| Div | What to divide by. |
| FORCEINLINE void FIntRect::GetCenterAndExtents | ( | FIntPoint & | OutCenter, |
| FIntPoint & | OutExtent | ||
| ) | const |
Gets the Center and Extents of this rectangle.
| OutCenter | Will contain the center point. |
| OutExtent | Will contain the extent. |
| FORCEINLINE int32 FIntRect::Height | ( | ) | const |
Gets the Height of the rectangle.
| FORCEINLINE void FIntRect::Include | ( | FIntPoint | Point | ) |
Adds to this rectangle to include a given point.
| Point | The point to increase the rectangle to. |
| FORCEINLINE void FIntRect::InflateRect | ( | int32 | Amount | ) |
Inflates or deflates the rectangle.
| Amount | The amount to inflate or deflate the rectangle on each side. |
Gets a new rectangle from the inner of this one.
| Shrink | How much to remove from each point of this rectangle. |
| FORCEINLINE bool FIntRect::IsEmpty | ( | ) | const |
Returns true if the rectangle is 0 x 0.
|
static |
Gets number of points in the Rectangle.
| FORCEINLINE bool FIntRect::operator!= | ( | const FIntRect & | Other | ) | const |
Compares Rectangles for inequality.
| Other | The Other Rectangle for comparison. |
| FORCEINLINE FIntPoint & FIntRect::operator() | ( | int32 | PointIndex | ) |
Gets a specific point in this rectangle.
| PointIndex | Index of Point in rectangle. |
| FORCEINLINE const FIntPoint & FIntRect::operator() | ( | int32 | PointIndex | ) | const |
Gets a specific point in this rectangle.
| PointIndex | Index of Point in rectangle. |
| FORCEINLINE FIntRect FIntRect::operator* | ( | int32 | Scale | ) | const |
Gets the result of scaling on this rectangle.
| Scale | What to multiply this rectangle by. |
| FORCEINLINE FIntRect & FIntRect::operator*= | ( | int32 | Scale | ) |
Applies scaling to this rectangle.
| Scale | What to multiply the rectangle by. |
Gets the result of adding a point to this rectangle.
| Point | The point to add to both points in the rectangle. |
Gets the result of adding two rectangles together.
| Other | The other rectangle to add to this. |
Adds a point to this rectangle.
| Point | The point to add onto both points in the rectangle. |
Gets the result of subtracting a point from this rectangle.
| Point | The point to subtract from both points in the rectangle. |
Gets the result of subtracting a rectangle from this one.
| Other | The other rectangle to subtract from this. |
Subtracts a point from this rectangle.
| Point | The point to subtract from both points in the rectangle. |
Gets the result of dividing a point with this rectangle.
| Point | The point to divide with. |
| FORCEINLINE FIntRect FIntRect::operator/ | ( | int32 | Div | ) | const |
Gets the result of division on this rectangle.
| Div | What to divide this rectangle by. |
| FORCEINLINE bool FIntRect::operator== | ( | const FIntRect & | Other | ) | const |
Compares Rectangles for equality.
| Other | The Other Rectangle for comparison. |
| FORCEINLINE FIntRect FIntRect::Right | ( | int32 | InWidth | ) | const |
Creates a rectangle from the right hand side of this rectangle.
| InWidth | Width of the new rectangle (<= rectangles original width). |
| FORCEINLINE FIntRect FIntRect::Scale | ( | float | Fraction | ) | const |
Scales a rectangle using a floating point number.
| Fraction | What to scale the rectangle by |
| FORCEINLINE FIntPoint FIntRect::Size | ( | ) | const |
Gets the distance from one corner of the rectangle to the other.
| FORCEINLINE FString FIntRect::ToString | ( | ) | const |
Get a textual representation of this rectangle.
| FORCEINLINE int32 FIntRect::Width | ( | ) | const |
Gets the width of the rectangle.
Serializes the Rectangle.
| Ar | The archive to serialize into. |
| Rect | The rectangle to serialize. |