|
Urho3D
|
Two-dimensional bounding rectangle with integer values. More...
#include </home/runner/work/Dviglo/Dviglo/DvigloRepository/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 |
| int | Width () const |
| int | Height () const |
| 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) |
| void | Merge (const IntRect &rect) |
| 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.
| void Dviglo::IntRect::Clip | ( | const IntRect & | rect | ) |
|
inline |
Return height.
| void Dviglo::IntRect::Merge | ( | const IntRect & | rect | ) |
Merge a rect. If this rect was empty, become the other rect. If the other rect is empty, do nothing.
|
inline |
Return size.
|
inline |
Return width.
1.8.17