Urho3D
|
Two-dimensional bounding rectangle with integer values. More...
#include </home/runner/work/urho3d-doxygen.github.io/urho3d-doxygen.github.io/urho3d_repo/Source/Urho3D/Math/Rect.h>
Public Member Functions | |
IntRect () noexcept | |
Construct a zero rect. | |
IntRect (const IntVector2 &min, const IntVector2 &max) noexcept | |
Construct from minimum and maximum vectors. | |
IntRect (int left, int top, int right, int bottom) noexcept | |
Construct from coordinates. | |
IntRect (const int *data) noexcept | |
Construct from an int array. | |
bool | operator== (const IntRect &rhs) const |
Test for equality with another rect. | |
bool | operator!= (const IntRect &rhs) const |
Test for inequality with another rect. | |
IntRect & | operator+= (const IntRect &rhs) |
Add another rect to this one inplace. | |
IntRect & | operator-= (const IntRect &rhs) |
Subtract another rect from this one inplace. | |
IntRect & | operator/= (float value) |
Divide by scalar inplace. | |
IntRect & | operator*= (float value) |
Multiply by scalar inplace. | |
IntRect | operator/ (float value) const |
Divide by scalar. | |
IntRect | operator* (float value) const |
Multiply by scalar. | |
IntRect | operator+ (const IntRect &rhs) const |
Add another rect. | |
IntRect | operator- (const IntRect &rhs) const |
Subtract another rect. | |
IntVector2 | Size () const |
Return size. | |
int | Width () const |
Return width. | |
int | Height () const |
Return height. | |
Intersection | IsInside (const IntVector2 &point) const |
Test whether a point is inside. | |
Intersection | IsInside (const IntRect &rect) const |
Test if another rect is inside, outside or intersects. | |
void | Clip (const IntRect &rect) |
Clip with another rect. Since IntRect does not have an undefined state like Rect, return (0, 0, 0, 0) if the result is empty. | |
void | Merge (const IntRect &rect) |
Merge a rect. If this rect was empty, become the other rect. If the other rect is empty, do nothing. | |
const int * | Data () const |
Return integer data. | |
String | ToString () const |
Return as string. | |
IntVector2 | Min () const |
Return left-top corner position. | |
IntVector2 | Max () const |
Return right-bottom corner position. | |
int | Left () const |
Return left coordinate. | |
int | Top () const |
Return top coordinate. | |
int | Right () const |
Return right coordinate. | |
int | Bottom () const |
Return bottom coordinate. | |
Public Attributes | |
int | left_ |
Left coordinate. | |
int | top_ |
Top coordinate. | |
int | right_ |
Right coordinate. | |
int | bottom_ |
Bottom coordinate. | |
Static Public Attributes | |
static const IntRect | ZERO |
Zero-sized rect. | |
Two-dimensional bounding rectangle with integer values.