![]() |
GA::kit v0.3
G&A's in-house C++ application framework
|
A 2D axis-aligned rectangle, with x,y (float) position and w,h (float) size components.
More...
#include <math.h>
Public Member Functions | |
| Rect () | |
| Rect (float xPos, float yPos, float width, float height) | |
| Rect (const vec2 &ptA, const vec2 &ptB) | |
| vec2 | position () const |
| vec2 | size () const |
| float | area () const |
| vec2 | min () const |
| vec2 | max () const |
| bool | contains (const vec2 &pt) const |
Public Attributes | |
| float | x |
| float | y |
| float | w |
| float | h |
A 2D axis-aligned rectangle, with x,y (float) position and w,h (float) size components.
The x,y position components are the "principle point" of the rectangle. The w,h components are added to the x,y point to find the 3 other corners.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| float ga::Rect::h |
| float ga::Rect::w |
| float ga::Rect::x |
| float ga::Rect::y |