|
| Rect () noexcept |
| Construct an undefined rect.
|
|
| Rect (const Vector2 &min, const Vector2 &max) noexcept |
| Construct from minimum and maximum vectors.
|
|
| Rect (float left, float top, float right, float bottom) noexcept |
| Construct from coordinates.
|
|
| Rect (const Vector4 &vector) noexcept |
| Construct from a Vector4.
|
|
| Rect (const float *data) noexcept |
| Construct from a float array.
|
|
| Rect (const Rect &rect) noexcept=default |
| Copy-construct from another rect.
|
|
Rect & | operator= (const Rect &rhs) noexcept=default |
| Assign from another rect.
|
|
bool | operator== (const Rect &rhs) const |
| Test for equality with another rect.
|
|
bool | operator!= (const Rect &rhs) const |
| Test for inequality with another rect.
|
|
Rect & | operator+= (const Rect &rhs) |
| Add another rect to this one inplace.
|
|
Rect & | operator-= (const Rect &rhs) |
| Subtract another rect from this one inplace.
|
|
Rect & | operator/= (float value) |
| Divide by scalar inplace.
|
|
Rect & | operator*= (float value) |
| Multiply by scalar inplace.
|
|
Rect | operator/ (float value) const |
| Divide by scalar.
|
|
Rect | operator* (float value) const |
| Multiply by scalar.
|
|
Rect | operator+ (const Rect &rhs) const |
| Add another rect.
|
|
Rect | operator- (const Rect &rhs) const |
| Subtract another rect.
|
|
void | Define (const Rect &rect) |
| Define from another rect.
|
|
void | Define (const Vector2 &min, const Vector2 &max) |
| Define from minimum and maximum vectors.
|
|
void | Define (const Vector2 &point) |
| Define from a point.
|
|
void | Merge (const Vector2 &point) |
| Merge a point.
|
|
void | Merge (const Rect &rect) |
| Merge a rect.
|
|
void | Clear () |
| Clear to undefined state.
|
|
void | Clip (const Rect &rect) |
| Clip with another rect.
|
|
bool | Defined () const |
| Return true if this rect is defined via a previous call to Define() or Merge().
|
|
Vector2 | Center () const |
|
Vector2 | Size () const |
|
Vector2 | HalfSize () const |
|
bool | Equals (const Rect &rhs) const |
| Test for equality with another rect with epsilon.
|
|
Intersection | IsInside (const Vector2 &point) const |
| Test whether a point is inside.
|
|
Intersection | IsInside (const Rect &rect) const |
| Test if another rect is inside, outside or intersects.
|
|
const float * | Data () const |
| Return float data.
|
|
Vector4 | ToVector4 () const |
| Return as a vector.
|
|
String | ToString () const |
| Return as string.
|
|
Vector2 | Min () const |
| Return left-top corner position.
|
|
Vector2 | Max () const |
| Return right-bottom corner position.
|
|
float | Left () const |
|
float | Top () const |
|
float | Right () const |
|
float | Bottom () const |
|
Two-dimensional bounding rectangle.