Two-dimensional bounding rectangle with integer values.
More...
#include </var/dev/u3d/stable/Source/Urho3D/Math/Rect.h>
|
|
| 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.
|
| |
|
|
int | left_ |
| | Left coordinate.
|
| |
|
int | top_ |
| | Top coordinate.
|
| |
|
int | right_ |
| | Right coordinate.
|
| |
|
int | bottom_ |
| | Bottom coordinate.
|
| |
|
|
static const IntRect | ZERO |
| | Zero-sized rect.
|
| |
Two-dimensional bounding rectangle with integer values.
◆ Clip()
| void Urho3D::IntRect::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.
◆ Height()
| int Urho3D::IntRect::Height |
( |
| ) |
const |
|
inline |
◆ Merge()
| void Urho3D::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.
◆ Size()
◆ Width()
| int Urho3D::IntRect::Width |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files:
- /var/dev/u3d/stable/Source/Urho3D/Math/Rect.h
- /var/dev/u3d/stable/Source/Urho3D/Math/Rect.cpp