| 67 | }; |
| 68 | |
| 69 | struct Rect { |
| 70 | Vec2 origin; |
| 71 | Size size; |
| 72 | PROPERTY(float, X); |
| 73 | PROPERTY(float, Y); |
| 74 | PROPERTY(float, Width); |
| 75 | PROPERTY(float, Height); |
| 76 | PROPERTY(float, Left); |
| 77 | PROPERTY(float, Right); |
| 78 | PROPERTY(float, CenterX); |
| 79 | PROPERTY(float, CenterY); |
| 80 | PROPERTY(float, Bottom); |
| 81 | PROPERTY(float, Top); |
| 82 | Rect(); |
| 83 | Rect(const Vec2& origin, const Size& size); |
| 84 | Rect(float x, float y, float width, float height); |
| 85 | Rect(const Rect& other); |
| 86 | bool operator==(const Rect& other) const; |
| 87 | bool operator!=(const Rect& other) const; |
| 88 | void setLowerBound(const Vec2& lowerBound); |
| 89 | Vec2 getLowerBound() const; |
| 90 | void setUpperBound(const Vec2& upperBound); |
| 91 | Vec2 getUpperBound() const; |
| 92 | void set(float x, float y, float width, float height); |
| 93 | bool containsPoint(const Vec2& point) const; |
| 94 | bool intersectsRect(const Rect& rect) const; |
| 95 | static const Rect zero; |
| 96 | }; |
| 97 | |
| 98 | struct Matrix; |
| 99 | |